com.jniwrapper
Class UInt64
java.lang.Object
com.jniwrapper.Parameter
com.jniwrapper.AbstractInteger
com.jniwrapper.Int64
com.jniwrapper.UInt64
- All Implemented Interfaces:
- IntegerParameter
- public class UInt64
- extends Int64
Represents 64-bit unsigned integer type specially designed to support UINT64 native type.
Field Summary |
static java.math.BigInteger |
MAX_UINT64
Maximum UINT64 value. |
Constructor Summary |
UInt64()
|
UInt64(java.math.BigInteger value)
Use this constructor to create unsigned value that is bigger than Long.MAX_VALUE value. |
UInt64(IntegerParameter value)
|
UInt64(long value)
|
Method Summary |
long |
getValue()
Returns internal presentation of unsigned long value. |
void |
setValue(java.math.BigInteger value)
Set the unsigned long of this UInt64 from BigIngeger value. |
java.math.BigInteger |
toBigInteger()
Returns the value of this UInt64 as a
BigInteger value. |
Methods inherited from class com.jniwrapper.Parameter |
acceptIOPerformer, asReturnValue, dataBufferAssigned, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, indent, pop, push, read, setDataBuffer, toByteArray, write |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
MAX_UINT64
public static final java.math.BigInteger MAX_UINT64
- Maximum UINT64 value.
This value is calculated by the following formula:
BigInteger.valueOf(Long.MAX_VALUE).multiply(BigInteger.valueOf(2)).add(BigInteger.ONE)
UInt64
public UInt64()
UInt64
public UInt64(long value)
UInt64
public UInt64(IntegerParameter value)
UInt64
public UInt64(java.math.BigInteger value)
- Use this constructor to create unsigned value that is bigger than
Long.MAX_VALUE
value.
- Parameters:
value
- unsigned value
setValue
public void setValue(java.math.BigInteger value)
- Set the unsigned long of this
UInt64
from BigIngeger
value.
- Parameters:
value
- unsigned BigInteger
value
getValue
public long getValue()
- Returns internal presentation of
unsigned long
value.
This value may be less than zero for unsigned long
values that bigger than Long.MAX_VALUE
.
To obtain such values correctly use toBigInteger()
method.
- Specified by:
getValue
in interface IntegerParameter
- Overrides:
getValue
in class Int64
toBigInteger
public java.math.BigInteger toBigInteger()
- Returns the value of this
UInt64
as a
BigInteger
value.