rebuild.util.ref
Class RefByte

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

public final class RefByte
extends RefNumber

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

Since:
BBX 1.1.0

Field Summary
static byte MAX_VALUE
          The maximum value a RefByte can have.
static byte MIN_VALUE
          The minimum value a RefByte 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
RefByte()
          Create a new RefByte set to the default of 0.
RefByte(byte value)
          Create a new RefByte using a byte primitive.
RefByte(java.lang.Byte value)
          Create a new RefByte using a Byte.
RefByte(byte value, boolean fixed)
          Create a new RefByte using a byte primitive.
RefByte(java.lang.Byte value, boolean fixed)
          Create a new RefByte using a Byte.
 
Method Summary
 byte byteValue()
          Returns The value of this RefByte object as a byte primitive.
 RefByte 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 RefByte object.
static byte parseByte(java.lang.String s)
          Assuming the specified String represents a byte, returns that byte's value.
static byte parseByte(java.lang.String s, int radix)
          Assuming the specified String represents a byte, returns that byte's value.
 RefByte setValue(byte value)
          Set the value of this RefByte object with a byte primitive.
 RefByte setValue(java.lang.Byte value)
          Set the value of this RefByte object with a Byte.
 java.lang.String toString()
          Returns a String object representing this RefByte's value.
 
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

public static final byte MAX_VALUE
The maximum value a RefByte can have.

See Also:
Constant Field Values

MIN_VALUE

public static final byte MIN_VALUE
The minimum value a RefByte can have.

See Also:
Constant Field Values
Constructor Detail

RefByte

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


RefByte

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

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

RefByte

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

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

RefByte

public RefByte(java.lang.Byte value)
Create a new RefByte using a Byte.

Parameters:
value - The Byte to set this RefByte with.

RefByte

public RefByte(java.lang.Byte value,
               boolean fixed)
Create a new RefByte using a Byte.

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

byteValue

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

Returns:
The primitive byte value of this object.

setValue

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

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

setValue

public RefByte setValue(java.lang.Byte value)
Set the value of this RefByte 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 RefByte 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 RefByte's value.

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

parseByte

public static byte parseByte(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.

parseByte

public static byte parseByte(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 RefByte clone()
Create a clone of the current object.

Returns:
A clone of the current RefByte.

cloneNumber

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

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