com.jniwrapper
Class UInt64

java.lang.Object
  extended by com.jniwrapper.Parameter
      extended by com.jniwrapper.Int64
          extended by 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.
 
Fields inherited from class com.jniwrapper.Parameter
LICENSE_TYPE, V
 
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
 boolean equals(java.lang.Object obj)
          Compares two instances as IntegerParameter by their value.
 java.lang.String getDebugInfo()
          Return debug info for JNIWrapper parameter.
 long getValue()
          Returns internal presentation of unsigned long value.
 int hashCode()
           
 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.
 java.lang.Long toLong()
           
 java.lang.String toString()
           
 
Methods inherited from class com.jniwrapper.Int64
clone, getLength, read, setValue, write
 
Methods inherited from class com.jniwrapper.Parameter
acceptIOPerformer, asReturnValue, dataBufferAssigned, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, indent, pop, push, read, read, setDataBuffer, toByteArray, write
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

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)

Constructor Detail

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
Method Detail

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.


equals

public boolean equals(java.lang.Object obj)
Compares two instances as IntegerParameter by their value.

Overrides:
equals in class Parameter
Parameters:
obj - a value to compare this object to.
Returns:
true if values are equal.

hashCode

public int hashCode()
Overrides:
hashCode in class Parameter

toLong

public java.lang.Long toLong()

getDebugInfo

public java.lang.String getDebugInfo()
Description copied from class: Parameter
Return debug info for JNIWrapper parameter.

Specified by:
getDebugInfo in class Parameter
Returns:
debug info

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object