rebuild.util.ref
Class RefUByte

java.lang.Object
  extended by rebuild.util.ref.RefNumber
      extended by rebuild.util.ref.RefUByte

public final class RefUByte
extends RefNumber

Reference UByte is the same as Byte but is unsigned and allows you to set the byte without creating a new Byte.

Since:
BBX 1.1.0

Field Summary
static RefUByte MAX_VALUE
          The maximum value a RefUByte can have.
static byte MAX_VALUE_BYTE
          The maximum value a RefUByte can have.
static RefUByte MIN_VALUE
          The minimum value a RefUByte can have.
static byte MIN_VALUE_BYTE
          The minimum value a RefUByte can have.
 
Fields inherited from class rebuild.util.ref.RefNumber
_fixed, BIT_SHIFT_LEFT, BIT_SHIFT_LEFT_LOGICAL, BIT_SHIFT_RIGHT, BIT_SHIFT_RIGHT_LOGICAL
 
Constructor Summary
RefUByte()
          Create a new RefByte set to the default of 0.
RefUByte(byte value)
          Create a new RefUByte using a byte primitive.
RefUByte(byte value, boolean fixed)
          Create a new RefUByte using a byte primitive.
 
Method Summary
 byte byteValue()
          Returns The value of this RefUByte object as a byte primitive.
 RefUByte clone()
          Create a clone of the current object.
 RefNumber cloneNumber()
          Create a clone of the current object.
 int hashCode()
          Returns a hash code for this RefUByte object.
static RefUByte parseUByte(java.lang.String s)
          Assuming the specified String represents a byte, returns that byte's value.
static RefUByte parseUByte(java.lang.String s, int radix)
          Assuming the specified String represents a byte, returns that byte's value.
 RefUByte setValue(byte value)
          Set the value of this RefUByte object with a byte primitive.
 RefUByte setValue(java.lang.Byte value)
          Set the value of this RefUByte object with a Byte.
 java.lang.String toString()
          Returns a String object representing this RefUByte's value.
 short ubyteValue()
          Returns The value of this RefUByte object as a short primitive.
 
Methods inherited from class rebuild.util.ref.RefNumber
add, add, add, add, add, add, add, add, and, and, and, and, and, and, bitShift, bitShift, bitShift, bitShift, bitShift, bitShift, castToByte, castToByte, castToByte, castToByte, castToByte, castToByte, castToByte, castToByte, castToByte, castToDouble, castToDouble, castToDouble, castToDouble, castToDouble, castToDouble, castToDouble, castToDouble, castToDouble, castToFloat, castToFloat, castToFloat, castToFloat, castToFloat, castToFloat, castToFloat, castToFloat, castToFloat, castToInt, castToInt, castToInt, castToInt, castToInt, castToInt, castToInt, castToInt, castToInt, castToLong, castToLong, castToLong, castToLong, castToLong, castToLong, castToLong, castToLong, castToLong, castToShort, castToShort, castToShort, castToShort, castToShort, castToShort, castToShort, castToShort, castToShort, castToUByte, castToUByte, castToUByte, castToUByte, castToUByte, castToUByte, castToUByte, castToUByte, castToUByte, castToUInt, castToUInt, castToUInt, castToUInt, castToUInt, castToUInt, castToUInt, castToUInt, castToUInt, castToULong, castToULong, castToULong, castToULong, castToULong, castToULong, castToULong, castToULong, castToULong, castToUShort, castToUShort, castToUShort, castToUShort, castToUShort, castToUShort, castToUShort, castToUShort, castToUShort, compliment, deincrement, divide, divide, divide, divide, divide, divide, divide, divide, equals, equals, equals, equals, equals, equals, equals, equals, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThanOrEqual, greaterThanOrEqual, greaterThanOrEqual, greaterThanOrEqual, greaterThanOrEqual, greaterThanOrEqual, greaterThanOrEqual, greaterThanOrEqual, increment, isReadOnly, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThanOrEqual, lessThanOrEqual, lessThanOrEqual, lessThanOrEqual, lessThanOrEqual, lessThanOrEqual, lessThanOrEqual, lessThanOrEqual, makeFixed, makeFixed, modulus, modulus, modulus, modulus, modulus, modulus, modulus, modulus, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, notEquals, notEquals, notEquals, notEquals, notEquals, notEquals, notEquals, notEquals, or, or, or, or, or, or, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract, xor, xor, xor, xor, xor, xor
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_VALUE_BYTE

public static final byte MAX_VALUE_BYTE
The maximum value a RefUByte can have. This is stored as a signed number for simplicity.

See Also:
Constant Field Values

MIN_VALUE_BYTE

public static final byte MIN_VALUE_BYTE
The minimum value a RefUByte can have. This is stored as a signed number for simplicity.

See Also:
Constant Field Values

MAX_VALUE

public static final RefUByte MAX_VALUE
The maximum value a RefUByte can have.


MIN_VALUE

public static final RefUByte MIN_VALUE
The minimum value a RefUByte can have.

Constructor Detail

RefUByte

public RefUByte()
Create a new RefByte set to the default of 0.


RefUByte

public RefUByte(byte value)
Create a new RefUByte using a byte primitive.

Parameters:
value - The byte primitive to set this RefUByte with.

RefUByte

public RefUByte(byte value,
                boolean fixed)
Create a new RefUByte using a byte primitive.

Parameters:
value - The byte primitive to set this RefUByte with.
fixed - If this item is read only and cannot be modified.
Method Detail

byteValue

public byte byteValue()
Returns The value of this RefUByte object as a byte primitive.

Returns:
The primitive byte value of this object.

ubyteValue

public short ubyteValue()
Returns The value of this RefUByte object as a short primitive.

Returns:
The primitive short value of this object. This is the only way to return the value unsigned.

setValue

public RefUByte setValue(byte value)
Set the value of this RefUByte object with a byte primitive.

Parameters:
value - The primitive byte value to set this object.
Returns:
This object.

setValue

public RefUByte setValue(java.lang.Byte value)
Set the value of this RefUByte object with a Byte.

Parameters:
value - The Byte value to set this object.
Returns:
This object.

hashCode

public int hashCode()
Returns a hash code for this RefUByte object.

Overrides:
hashCode in class java.lang.Object
Returns:
A hash code value for this object.

toString

public java.lang.String toString()
Returns a String object representing this RefUByte's value.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of the object.

parseUByte

public static RefUByte parseUByte(java.lang.String s)
Assuming the specified String represents a byte, returns that byte's value.

Parameters:
s - The String containing the byte.
Returns:
The parsed value of the byte.
Throws:
java.lang.NumberFormatException - If the string does not contain a parsable byte.

parseUByte

public static RefUByte parseUByte(java.lang.String s,
                                  int radix)
Assuming the specified String represents a byte, returns that byte's value.

Parameters:
s - The String containing the byte.
radix - The radix to be used.
Returns:
The parsed value of the byte.
Throws:
java.lang.NumberFormatException - If the string does not contain a parsable byte.

clone

public RefUByte clone()
Create a clone of the current object.

Returns:
A clone of the current RefUByte.

cloneNumber

public RefNumber cloneNumber()
Create a clone of the current object.

Specified by:
cloneNumber in class RefNumber
Returns:
A clone of the current RefUByte.