rebuild.util.ref
Class RefULong

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

public final class RefULong
extends RefNumber

Reference ULong is the same as Long but is unsigned and allows you to set the long without creating a new Long.

Since:
BBX 1.1.0

Field Summary
static RefULong MAX_VALUE
          The maximum value a RefULong can have.
static long MAX_VALUE_LONG
          The maximum value a RefULong can have.
static RefULong MIN_VALUE
          The minimum value a RefULong can have.
static long MIN_VALUE_LONG
          The minimum value a RefULong 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
RefULong()
          Create a new RefULong set to the default of 0.
RefULong(long value)
          Create a new RefULong using a long primitive.
RefULong(long value, boolean fixed)
          Create a new RefULong using a long primitive.
 
Method Summary
 RefULong 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 RefULong object.
 long longValue()
          Returns The value of this RefULong object as a long primitive.
static RefULong parseULong(java.lang.String s)
          Assuming the specified String represents a long, returns that long's value.
static RefULong parseULong(java.lang.String s, int radix)
          Assuming the specified String represents a long, returns that long's value.
 boolean raw_highBitValue()
          Returns if the high order bit of the ulong is set.
 long raw_ulongValue()
          Returns The value of this RefULong object as a long primitive.
 RefULong setValue(long value)
          Set the value of this RefULong object with a long primitive.
 RefULong setValue(java.lang.Long value)
          Set the value of this RefULong object with a Long.
 java.lang.String toString()
          Returns a String object representing this RefULong'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_LONG

public static final long MAX_VALUE_LONG
The maximum value a RefULong can have. This is stored as a signed number for simplicity.

See Also:
Constant Field Values

MIN_VALUE_LONG

public static final long MIN_VALUE_LONG
The minimum value a RefULong can have. This is stored as a signed number for simplicity.

See Also:
Constant Field Values

MAX_VALUE

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


MIN_VALUE

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

Constructor Detail

RefULong

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


RefULong

public RefULong(long value)
Create a new RefULong using a long primitive.

Parameters:
value - The long primitive to set this RefULong with.

RefULong

public RefULong(long value,
                boolean fixed)
Create a new RefULong using a long primitive.

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

longValue

public long longValue()
Returns The value of this RefULong object as a long primitive.

Returns:
The primitive long value of this object.

raw_ulongValue

public long raw_ulongValue()
Returns The value of this RefULong object as a long primitive. It does not contain the high order bit.

Returns:
The primitive long value of this object.

raw_highBitValue

public boolean raw_highBitValue()
Returns if the high order bit of the ulong is set.

Returns:
true if the high order bit is set, false otherwise.

setValue

public RefULong setValue(long value)
Set the value of this RefULong object with a long primitive.

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

setValue

public RefULong setValue(java.lang.Long value)
Set the value of this RefULong object with a Long.

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

hashCode

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

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

parseULong

public static RefULong parseULong(java.lang.String s)
Assuming the specified String represents a long, returns that long's value.

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

parseULong

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

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

clone

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

Returns:
A clone of the current RefULong.

cloneNumber

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

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