BigInteger BigInteger Class

Definition

An immutable arbitrary-precision signed integer.

[Android.Runtime.Register("java/math/BigInteger", ApiSince=1, DoNotGenerateAcw=true)]
public class BigInteger : Java.Lang.Number, IDisposable, Java.Lang.IComparable
type BigInteger = class
    inherit Number
    interface ISerializable
    interface IJavaObject
    interface IDisposable
    interface IComparable
Inheritance
Attributes
Implements

Remarks

Android platform documentation

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

BigInteger(Byte[]) BigInteger(Byte[])

Constructs a new BigInteger from the given two's complement representation.

BigInteger(Int32, Byte[]) BigInteger(Int32, Byte[])

Constructs a new BigInteger instance with the given sign and magnitude.

BigInteger(Int32, Int32, Random) BigInteger(Int32, Int32, Random)

Constructs a random BigInteger instance in the range [0, pow(2, bitLength)-1] which is probably prime.

BigInteger(Int32, Random) BigInteger(Int32, Random)

Constructs a random non-negative BigInteger instance in the range [0, pow(2, numBits)-1].

BigInteger(IntPtr, JniHandleOwnership) BigInteger(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

BigInteger(String) BigInteger(String)

Constructs a new BigInteger by parsing value.

BigInteger(String, Int32) BigInteger(String, Int32)

Constructs a new BigInteger instance by parsing value.

Properties

Class Class

Returns the unique instance of Class that represents this object's class.

(Inherited from Object)
Handle Handle

The handle to the underlying Android instance.

(Inherited from Object)
IJavaObjectEx.IsProxy IJavaObjectEx.IsProxy Inherited from Object
IJavaObjectEx.KeyHandle IJavaObjectEx.KeyHandle Inherited from Object
IJavaObjectEx.NeedsActivation IJavaObjectEx.NeedsActivation Inherited from Object
IJavaPeerable.JniManagedPeerState IJavaPeerable.JniManagedPeerState Inherited from Object
JniIdentityHashCode JniIdentityHashCode Inherited from Object
JniPeerMembers JniPeerMembers
LowestSetBit LowestSetBit

Returns the position of the lowest set bit in the two's complement representation of this BigInteger.

One One

The BigInteger constant 1.

PeerReference PeerReference Inherited from Object
Ten Ten

The BigInteger constant 10.

ThresholdClass ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Zero Zero

The BigInteger constant 0.

Methods

Abs() Abs()

Returns a BigInteger whose value is the absolute value of this.

Add(BigInteger) Add(BigInteger)

Returns a BigInteger whose value is this + value.

And(BigInteger) And(BigInteger)

Returns a BigInteger whose value is this & value.

AndNot(BigInteger) AndNot(BigInteger)

Returns a BigInteger whose value is this & ~value.

BitCount() BitCount()

Returns the number of bits in the two's complement representation of this which differ from the sign bit.

BitLength() BitLength()

Returns the length of the value's two's complement representation without leading zeros for positive numbers / without leading ones for negative values.

ByteValue() ByteValue()

Returns this object's value as a byte.

(Inherited from Number)
ClearBit(Int32) ClearBit(Int32)

Returns a BigInteger which has the same binary representation as this but with the bit at position n cleared.

Clone() Clone()

Creates and returns a copy of this Object.

(Inherited from Object)
CompareTo(BigInteger) CompareTo(BigInteger)

Compares this BigInteger with value.

Dispose() Dispose() Inherited from Object
Dispose(Boolean) Dispose(Boolean) Inherited from Object
Divide(BigInteger) Divide(BigInteger)

Returns a BigInteger whose value is this / divisor.

DivideAndRemainder(BigInteger) DivideAndRemainder(BigInteger)

Returns a two element BigInteger array containing this / divisor at index 0 and this % divisor at index 1.

DoubleValue() DoubleValue()

Returns this BigInteger as a double.

Equals(Object) Equals(Object)

Compares this instance with the specified object and indicates if they are equal.

(Inherited from Object)
FlipBit(Int32) FlipBit(Int32)

Returns a BigInteger which has the same binary representation as this but with the bit at position n flipped.

FloatValue() FloatValue()

Returns this BigInteger as a float.

Gcd(BigInteger) Gcd(BigInteger)

Returns a BigInteger whose value is greatest common divisor of this and value.

GetHashCode() GetHashCode()

Returns an integer hash code for this object.

(Inherited from Object)
IntValue() IntValue()

Returns this BigInteger as an int value.

IsProbablePrime(Int32) IsProbablePrime(Int32)

Tests whether this BigInteger is probably prime.

JavaFinalize() JavaFinalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)
LongValue() LongValue()

Returns this BigInteger as a long value.

Max(BigInteger) Max(BigInteger)

Returns the maximum of this BigInteger and value.

Min(BigInteger) Min(BigInteger)

Returns the minimum of this BigInteger and value.

Mod(BigInteger) Mod(BigInteger)

Returns a BigInteger whose value is this mod m.

ModInverse(BigInteger) ModInverse(BigInteger)

Returns a BigInteger whose value is 1/this mod m.

ModPow(BigInteger, BigInteger) ModPow(BigInteger, BigInteger)

Returns a BigInteger whose value is pow(this, exponent) mod modulus.

Multiply(BigInteger) Multiply(BigInteger)

Returns a BigInteger whose value is this * value.

Negate() Negate()

Returns a BigInteger whose value is the -this.

NextProbablePrime() NextProbablePrime()

Returns the smallest integer x > this which is probably prime as a BigInteger instance.

Not() Not()

Returns a BigInteger whose value is ~this.

Notify() Notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyAll() NotifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
Or(BigInteger) Or(BigInteger)

Returns a BigInteger whose value is this | value.

Pow(Int32) Pow(Int32)

Returns a BigInteger whose value is pow(this, exp).

ProbablePrime(Int32, Random) ProbablePrime(Int32, Random)

Returns a random positive BigInteger instance in the range [0, pow(2, bitLength)-1] which is probably prime.

Remainder(BigInteger) Remainder(BigInteger)

Returns a BigInteger whose value is this % divisor.

SetBit(Int32) SetBit(Int32)

Returns a BigInteger which has the same binary representation as this but with the bit at position n set.

SetHandle(IntPtr, JniHandleOwnership) SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ShiftLeft(Int32) ShiftLeft(Int32)

Returns a BigInteger whose value is this .

ShiftRight(Int32) ShiftRight(Int32)

Returns a BigInteger whose value is this >> n.

ShortValue() ShortValue()

Returns this object's value as a short.

(Inherited from Number)
Signum() Signum()

Returns the sign of this BigInteger.

Subtract(BigInteger) Subtract(BigInteger)

Returns a BigInteger whose value is this - value.

TestBit(Int32) TestBit(Int32)

Tests whether the bit at position n in this is set.

ToArray<T>() ToArray<T>() Inherited from Object
ToByteArray() ToByteArray()

Returns the two's complement representation of this BigInteger in a byte array.

ToString() ToString()

Returns a string containing a concise, human-readable description of this object.

(Inherited from Object)
ToString(Int32) ToString(Int32)

Returns a string containing a string representation of this BigInteger with base radix.

UnregisterFromRuntime() UnregisterFromRuntime() Inherited from Object
ValueOf(Int64) ValueOf(Int64)

Returns a BigInteger whose value is equal to value.

Wait() Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)
Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Xor(BigInteger) Xor(BigInteger)

Returns a BigInteger whose value is this ^ value.

Explicit Interface Implementations

IComparable.CompareTo(Object) IComparable.CompareTo(Object)
IJavaObjectEx.ToLocalJniHandle() IJavaObjectEx.ToLocalJniHandle() Inherited from Object
IJavaPeerable.Disposed() IJavaPeerable.Disposed() Inherited from Object
IJavaPeerable.DisposeUnlessReferenced() IJavaPeerable.DisposeUnlessReferenced() Inherited from Object
IJavaPeerable.Finalized() IJavaPeerable.Finalized() Inherited from Object
IJavaPeerable.SetJniIdentityHashCode(Int32) IJavaPeerable.SetJniIdentityHashCode(Int32) Inherited from Object
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) Inherited from Object
IJavaPeerable.SetPeerReference(JniObjectReference) IJavaPeerable.SetPeerReference(JniObjectReference) Inherited from Object

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable) GetJniTypeName(IJavaPeerable)

Applies to