rebuild.util.ref
Class RefLong

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

public final class RefLong
extends RefNumber

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

Since:
BBX 1.1.0

Field Summary
static long MAX_VALUE
          The largest value of type long.
static long MIN_VALUE
          The smallest value of type long.
 
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
RefLong()
          Create a new RefLong set to the default of 0L.
RefLong(long value)
          Create a new RefLong using a long primitive.
RefLong(java.lang.Long value)
          Create a new RefLong using a Long.
RefLong(long value, boolean fixed)
          Create a new RefLong using a long primitive.
RefLong(java.lang.Long value, boolean fixed)
          Create a new RefLong using a Long.
 
Method Summary
 RefLong clone()
          Create a clone of the current object.
 RefNumber cloneNumber()
          Create a clone of the current object.
 double doubleValue()
          Returns the value of this RefLong as a double.
 float floatValue()
          Returns the value of this RefLong as a float.
 int hashCode()
          Returns a hash code for this RefLong object.
 long longValue()
          Returns Returns the value of this RefLong as an long.
static long parseLong(java.lang.String s)
          Parses the string argument as a signed decimal long.
static long parseLong(java.lang.String s, int radix)
          Parses the string argument as a signed long in the radix specified by the second argument.
 RefLong setValue(long value)
          Set the value of this RefLong object with a long primitive.
 RefLong setValue(java.lang.Long value)
          Set the value of this RefLong object with a Long.
 java.lang.String toString()
          Returns a String object representing this RefLong's value.
static java.lang.String toString(long i)
          Returns a new String object representing the specified integer.
static java.lang.String toString(long i, int radix)
          Creates a string representation of the first argument in the radix specified by the second argument.
 
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 long MAX_VALUE
The largest value of type long.

See Also:
Constant Field Values

MIN_VALUE

public static final long MIN_VALUE
The smallest value of type long.

See Also:
Constant Field Values
Constructor Detail

RefLong

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


RefLong

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

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

RefLong

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

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

RefLong

public RefLong(java.lang.Long value)
Create a new RefLong using a Long.

Parameters:
value - The Long to set this RefLong with.

RefLong

public RefLong(java.lang.Long value,
               boolean fixed)
Create a new RefLong using a Long.

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

longValue

public long longValue()
Returns Returns the value of this RefLong as an long.

Returns:
The long value represented by this object.

setValue

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

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

setValue

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

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

doubleValue

public double doubleValue()
Returns the value of this RefLong as a double.

Returns:
The long value represented by this object that is converted to type double and the result of the conversion is returned.

floatValue

public float floatValue()
Returns the value of this RefLong as a float.

Returns:
The long value represented by this object is converted to type float and the result of the conversion is returned.

parseLong

public static long parseLong(java.lang.String s)
Parses the string argument as a signed decimal long.

Parameters:
s - A string.
Returns:
The long represented by the argument in decimal.
Throws:
java.lang.NumberFormatException - If the string does not contain a parsable long.

parseLong

public static long parseLong(java.lang.String s,
                             int radix)
Parses the string argument as a signed long in the radix specified by the second argument.

Parameters:
s - The String containing the long.
radix - The radix to be used.
Returns:
The long represented by the string argument in the specified radix.
Throws:
java.lang.NumberFormatException - If the string does not contain a parsable integer.

toString

public static java.lang.String toString(long i)
Returns a new String object representing the specified integer.

Parameters:
i - A long to be converted.
Returns:
A string representation of the argument in base 10.

toString

public static java.lang.String toString(long i,
                                        int radix)
Creates a string representation of the first argument in the radix specified by the second argument.

Parameters:
i - A long.
radix - The radix.
Returns:
A string representation of the argument in the specified radix.

clone

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

Returns:
A clone of the current RefLong.

cloneNumber

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

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