Servertec
Jenie
1.0.1 09/04/2005

stec.jenie
Class UINT

java.lang.Object
  extended by stec.jenie.NativeObject
      extended by stec.jenie.UINT
All Implemented Interfaces:
NativeParameter

public class UINT
extends NativeObject
implements NativeParameter

Represents a native unsigned integer value.

Depending on the platform values are native unsigned 32-bit or 64-bit integers.

Since:
1.0.0 12/05/2004

Field Summary
static int SIZEOF
          The size in bytes of an unsigned integer.
 
Constructor Summary
UINT()
          Constructs a new unsigned integer.
UINT(long value)
          Constucts a new unsigned integer set to the specified value.
UINT(Pointer pointer)
          Constructs a new unsigned integer from the specified pointer to an unsigned integer.
UINT(UINT value)
          Constucts a new unsigned integer set to the specified value.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this unsigned integer.
 int compareTo(java.lang.Object object)
          Compares this unsigned integer to the specified unsigned integer.
 int compareTo(UINT value)
          Compares this unsigned integer to the specified unsigned integer.
 boolean equals(java.lang.Object object)
          Returns whether this unsigned integer equals the specified unsigned integer.
 long getValue()
          Returns the current value.
 int hashCode()
          Returns the hash code of this unsigned integer.
 void setValue(long value)
          Sets this unsigned integer to the specified value.
 void setValue(Pointer pointer)
          Sets this unsigned integer to the unsigned integer referenced by the specified pointer to an unsigned integer.
 void setValue(UINT value)
          Sets this unsigned integer to the specified value.
 java.lang.String toString()
          Returns a String representation of this unsigned integer.
 
Methods inherited from class stec.jenie.NativeObject
getAlignment, getNativeAddress, getNativeBuffer, getNativeBufferHandle, setNativeBuffer, setNativeBuffer, setNativeBuffer, size
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface stec.jenie.NativeParameter
getNativeBufferHandle
 

Field Detail

SIZEOF

public static final int SIZEOF
The size in bytes of an unsigned integer.

Constructor Detail

UINT

public UINT()
     throws java.lang.OutOfMemoryError
Constructs a new unsigned integer.

Defaults to 0.

Throws:
java.lang.OutOfMemoryError - if there is not enough free memory.

UINT

public UINT(long value)
     throws java.lang.OutOfMemoryError
Constucts a new unsigned integer set to the specified value.

Parameters:
value - the value to use.
Throws:
java.lang.OutOfMemoryError - if there is not enough free memory.

UINT

public UINT(UINT value)
     throws java.lang.OutOfMemoryError
Constucts a new unsigned integer set to the specified value.

Parameters:
value - the value to use.
Throws:
java.lang.OutOfMemoryError - if there is not enough free memory.

UINT

public UINT(Pointer pointer)
Constructs a new unsigned integer from the specified pointer to an unsigned integer.

Parameters:
pointer - the pointer to the unsigned integer.
Method Detail

getValue

public long getValue()
Returns the current value.

Returns:
the current value.

setValue

public void setValue(long value)
Sets this unsigned integer to the specified value.

Parameters:
value - the value to use.

setValue

public void setValue(UINT value)
Sets this unsigned integer to the specified value.

Parameters:
value - the value to use.

setValue

public void setValue(Pointer pointer)
Sets this unsigned integer to the unsigned integer referenced by the specified pointer to an unsigned integer.

Parameters:
pointer - the pointer to an unsigned integer.

toString

public java.lang.String toString()
Returns a String representation of this unsigned integer.

Overrides:
toString in class java.lang.Object
Returns:
the String representation of this unsigned integer.

equals

public boolean equals(java.lang.Object object)
Returns whether this unsigned integer equals the specified unsigned integer.

Overrides:
equals in class NativeObject
Parameters:
object - the unsigned integer to compare against.
Returns:
whether this unsigned integer equals the specified unsigned integer.

compareTo

public int compareTo(UINT value)
Compares this unsigned integer to the specified unsigned integer.

Parameters:
value - the unsigned integer to compare against.
Returns:
0 if this unsigned integer is the same as the specified unsigned integer, a negative integer if this unsigned integer is less than the specified unsigned integer and a positive integer if this unsigned integer is greater than the specified unsigned integer.

compareTo

public int compareTo(java.lang.Object object)
              throws java.lang.ClassCastException
Compares this unsigned integer to the specified unsigned integer.

Parameters:
object - the unsigned integer to compare against.
Returns:
0 if this unsigned integer is the same as the specified unsigned integer, a negative integer if this unsigned integer is less than the specified unsigned integer and a positive integer if this unsigned integer is greater than the specified unsigned integer.
Throws:
java.lang.ClassCastException - if the specified object is not an unsigned integer.

hashCode

public int hashCode()
Returns the hash code of this unsigned integer.

Overrides:
hashCode in class NativeObject
Returns:
the hash code of this unsigned integer.

clone

public java.lang.Object clone()
                       throws java.lang.OutOfMemoryError
Returns a clone of this unsigned integer.

Specified by:
clone in interface NativeParameter
Specified by:
clone in class NativeObject
Returns:
the clone of this unsigned integer.
Throws:
java.lang.OutOfMemoryError - if there is not enough free memory.

Servertec
Jenie
1.0.1 09/04/2005

Copyright © 2004-2005 Servertec. All rights reserved.