rebuild.util.ref
Class RefUInteger

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

public final class RefUInteger
extends RefNumber

Reference UInteger is the same as Integer but is unsigned and allows you to set the int without creating a new Integer.

Since:
BBX 1.1.0

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

public static final int MAX_VALUE_INT
The maximum value a RefUInteger can have. This is stored as a signed number for simplicity.

See Also:
Constant Field Values

MIN_VALUE_INT

public static final int MIN_VALUE_INT
The minimum value a RefUInteger can have. This is stored as a signed number for simplicity.

See Also:
Constant Field Values

MAX_VALUE

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


MIN_VALUE

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

Constructor Detail

RefUInteger

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


RefUInteger

public RefUInteger(int value)
Create a new RefUInteger using a int primitive.

Parameters:
value - The int primitive to set this RefUInteger with.

RefUInteger

public RefUInteger(int value,
                   boolean fixed)
Create a new RefUInteger using a int primitive.

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

intValue

public int intValue()
Returns The value of this RefUInteger object as a int primitive.

Returns:
The primitive int value of this object.

uintValue

public long uintValue()
Returns The value of this RefUInteger object as a long primitive.

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

setValue

public RefUInteger setValue(int value)
Set the value of this RefUInteger object with a int primitive.

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

setValue

public RefUInteger setValue(java.lang.Integer value)
Set the value of this RefUInteger object with a Integer.

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

hashCode

public int hashCode()
Returns a hash code for this RefUInteger 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 RefUInteger's value.

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

parseUInteger

public static RefUInteger parseUInteger(java.lang.String s)
Assuming the specified String represents a int, returns that int's value.

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

parseUInteger

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

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

clone

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

Returns:
A clone of the current RefUInteger.

cloneNumber

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

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