Servertec
Jenie
1.0.1 09/04/2005

stec.jenie
Class UINT8

java.lang.Object
  extended by stec.jenie.NativeObject
      extended by stec.jenie.UINT8
All Implemented Interfaces:
NativeParameter
Direct Known Subclasses:
BYTE, UCHAR

public class UINT8
extends NativeObject
implements NativeParameter

Represents a native unsigned 8-bit integer value.

Since:
1.0.0 12/05/2004

Field Summary
static int SIZEOF
          The size in bytes of an unsigned 8-bit integer.
 
Constructor Summary
UINT8()
          Constructs a new unsigned 8-bit integer.
UINT8(Pointer pointer)
          Constructs a new unsigned 8-bit integer from the specified pointer to an unsigned 8-bit integer.
UINT8(short value)
          Constucts a new unsigned 8-bit integer set to the specified value.
UINT8(UINT8 value)
          Constucts a new unsigned 8-bit integer set to the specified value.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this unsigned 8-bit integer.
 int compareTo(java.lang.Object object)
          Compares this unsigned 8-bit integer to the specified unsigned 8-bit integer.
 int compareTo(UINT8 value)
          Compares this unsigned 8-bit integer to the specified unsigned 8-bit integer.
 boolean equals(java.lang.Object object)
          Returns whether this unsigned 8-bit integer equals the specified unsigned 8-bit integer.
 short getValue()
          Returns the current value.
 int hashCode()
          Returns the hash code of this unsigned 8-bit integer.
 void setValue(Pointer pointer)
          Sets this unsigned 8-bit integer to the unsigned 8-bit integer referenced by the specified pointer to an unsigned 8-bit integer.
 void setValue(short value)
          Sets this unsigned 8-bit integer to the specified value.
 void setValue(UINT8 value)
          Sets this unsigned 8-bit integer to the specified value.
 java.lang.String toString()
          Returns a String representation of this unsigned 8-bit 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 8-bit integer.

See Also:
Constant Field Values
Constructor Detail

UINT8

public UINT8()
      throws java.lang.OutOfMemoryError
Constructs a new unsigned 8-bit integer.

Defaults to 0.

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

UINT8

public UINT8(short value)
      throws java.lang.OutOfMemoryError
Constucts a new unsigned 8-bit integer set to the specified value.

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

UINT8

public UINT8(UINT8 value)
      throws java.lang.OutOfMemoryError
Constucts a new unsigned 8-bit integer set to the specified value.

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

UINT8

public UINT8(Pointer pointer)
Constructs a new unsigned 8-bit integer from the specified pointer to an unsigned 8-bit integer.

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

getValue

public short getValue()
Returns the current value.

Returns:
the current value.

setValue

public void setValue(short value)
Sets this unsigned 8-bit integer to the specified value.

Parameters:
value - the value to use.

setValue

public void setValue(UINT8 value)
Sets this unsigned 8-bit integer to the specified value.

Parameters:
value - the value to use.

setValue

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

Parameters:
pointer - the pointer to an unsigned 8-bit integer.

toString

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

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

equals

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

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

compareTo

public int compareTo(UINT8 value)
Compares this unsigned 8-bit integer to the specified unsigned 8-bit integer.

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

compareTo

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

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

hashCode

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

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

clone

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

Specified by:
clone in interface NativeParameter
Specified by:
clone in class NativeObject
Returns:
the clone of this unsigned 8-bit 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.