rebuild.util.ref
Class RefNumber

java.lang.Object
  extended by rebuild.util.ref.RefNumber
Direct Known Subclasses:
RefByte, RefDouble, RefFloat, RefInteger, RefLong, RefShort, RefUByte, RefUInteger, RefULong, RefUShort

public abstract class RefNumber
extends java.lang.Object

A reference number, this class contains many of the different operations that a number could do.

Anything of type RefNumber is treated like the number it represents. If a number of type double must be converted to an int to be processed, the same will occur here and the type will be automatically converted to the required type. Also the same operation will occur for RefDouble and RefInteger if the same operation were to occur (just like explained above).

If the number could not be converted, or there is more then one type it could be converted to, and that could cause a different result (with the exception of different size types), then the number will be returned as-is and no processing will occur. If a numeric error will occur with any numbers (such as divide by zero), it will be thrown.

RefNumbers can be "fixed" or constant. They cannot be changed and must be cloned in order to change there value. If any operation is performed on a fixed RefNumber then the number is cloned automatically and the operation is performed on the clone. The original number is not changed at all.

Since:
BBX 1.1.0

Field Summary
protected  boolean _fixed
           
static int BIT_SHIFT_LEFT
          Arithmetic bit-shift left, <<.
static int BIT_SHIFT_LEFT_LOGICAL
          Logical bit-shift left, <<<.
static int BIT_SHIFT_RIGHT
          Arithmetic bit-shift right, >>.
static int BIT_SHIFT_RIGHT_LOGICAL
          Logical bit-shift right, >>>.
 
Method Summary
 RefNumber add(byte value)
          Add a number to this number.
 RefNumber add(double value)
          Add a number to this number.
 RefNumber add(float value)
          Add a number to this number.
 RefNumber add(int value)
          Add a number to this number.
 RefNumber add(long value)
          Add a number to this number.
 RefNumber add(java.lang.Object value)
          Add some value to this number, if the passed object is not of any use then it is ignored.
 RefNumber add(RefNumber number)
          Add a reference number to this number.
 RefNumber add(short value)
          Add a number to this number.
 RefNumber and(byte value)
          Perform a binary AND (&) operation on this RefNumber.
 RefNumber and(int value)
          Perform a binary AND (&) operation on this RefNumber.
 RefNumber and(long value)
          Perform a binary AND (&) operation on this RefNumber.
 RefNumber and(java.lang.Object value)
          Perform a binary AND (&) operation on this RefNumber using an object.
 RefNumber and(RefNumber number)
          Perform a binary AND (&) operation on this RefNumber using another RefNumber.
 RefNumber and(short value)
          Perform a binary AND (&) operation on this RefNumber.
 RefNumber bitShift(byte value, int op)
          Perform a bit-shift operation on this RefNumber.
 RefNumber bitShift(int value, int op)
          Perform a bit-shift operation on this RefNumber.
 RefNumber bitShift(long value, int op)
          Perform a bit-shift operation on this RefNumber.
 RefNumber bitShift(java.lang.Object value, int op)
          Perform a bit-shift operation on this RefNumber using an object.
 RefNumber bitShift(RefNumber number, int op)
          Perform a bit-shift operation on this RefNumber using another RefNumber.
 RefNumber bitShift(short value, int op)
          Perform a bit-shift operation on this RefNumber.
 RefByte castToByte()
          Convert this RefNumber to a RefNumber of specified type.
static RefByte castToByte(byte value)
          Convert a number to a RefNumber or specified type.
static RefByte castToByte(double value)
          Convert a number to a RefNumber or specified type.
static RefByte castToByte(float value)
          Convert a number to a RefNumber or specified type.
static RefByte castToByte(int value)
          Convert a number to a RefNumber or specified type.
static RefByte castToByte(long value)
          Convert a number to a RefNumber or specified type.
static RefByte castToByte(java.lang.Object value)
          Convert a Object to a RefNumber or specified type.
static RefByte castToByte(RefNumber value)
          Convert a Object to a RefNumber or specified type.
static RefByte castToByte(short value)
          Convert a number to a RefNumber or specified type.
 RefDouble castToDouble()
          Convert this RefNumber to a RefNumber of specified type.
static RefDouble castToDouble(byte value)
          Convert a number to a RefNumber or specified type.
static RefDouble castToDouble(double value)
          Convert a number to a RefNumber or specified type.
static RefDouble castToDouble(float value)
          Convert a number to a RefNumber or specified type.
static RefDouble castToDouble(int value)
          Convert a number to a RefNumber or specified type.
static RefDouble castToDouble(long value)
          Convert a number to a RefNumber or specified type.
static RefDouble castToDouble(java.lang.Object value)
          Convert a Object to a RefNumber or specified type.
static RefDouble castToDouble(RefNumber value)
          Convert a Object to a RefNumber or specified type.
static RefDouble castToDouble(short value)
          Convert a number to a RefNumber or specified type.
 RefFloat castToFloat()
          Convert this RefNumber to a RefNumber of specified type.
static RefFloat castToFloat(byte value)
          Convert a number to a RefNumber or specified type.
static RefFloat castToFloat(double value)
          Convert a number to a RefNumber or specified type.
static RefFloat castToFloat(float value)
          Convert a number to a RefNumber or specified type.
static RefFloat castToFloat(int value)
          Convert a number to a RefNumber or specified type.
static RefFloat castToFloat(long value)
          Convert a number to a RefNumber or specified type.
static RefFloat castToFloat(java.lang.Object value)
          Convert a Object to a RefNumber or specified type.
static RefFloat castToFloat(RefNumber value)
          Convert a Object to a RefNumber or specified type.
static RefFloat castToFloat(short value)
          Convert a number to a RefNumber or specified type.
 RefInteger castToInt()
          Convert this RefNumber to a RefNumber of specified type.
static RefInteger castToInt(byte value)
          Convert a number to a RefNumber or specified type.
static RefInteger castToInt(double value)
          Convert a number to a RefNumber or specified type.
static RefInteger castToInt(float value)
          Convert a number to a RefNumber or specified type.
static RefInteger castToInt(int value)
          Convert a number to a RefNumber or specified type.
static RefInteger castToInt(long value)
          Convert a number to a RefNumber or specified type.
static RefInteger castToInt(java.lang.Object value)
          Convert a Object to a RefNumber or specified type.
static RefInteger castToInt(RefNumber value)
          Convert a Object to a RefNumber or specified type.
static RefInteger castToInt(short value)
          Convert a number to a RefNumber or specified type.
 RefLong castToLong()
          Convert this RefNumber to a RefNumber of specified type.
static RefLong castToLong(byte value)
          Convert a number to a RefNumber or specified type.
static RefLong castToLong(double value)
          Convert a number to a RefNumber or specified type.
static RefLong castToLong(float value)
          Convert a number to a RefNumber or specified type.
static RefLong castToLong(int value)
          Convert a number to a RefNumber or specified type.
static RefLong castToLong(long value)
          Convert a number to a RefNumber or specified type.
static RefLong castToLong(java.lang.Object value)
          Convert a Object to a RefNumber or specified type.
static RefLong castToLong(RefNumber value)
          Convert a Object to a RefNumber or specified type.
static RefLong castToLong(short value)
          Convert a number to a RefNumber or specified type.
 RefShort castToShort()
          Convert this RefNumber to a RefNumber of specified type.
static RefShort castToShort(byte value)
          Convert a number to a RefNumber or specified type.
static RefShort castToShort(double value)
          Convert a number to a RefNumber or specified type.
static RefShort castToShort(float value)
          Convert a number to a RefNumber or specified type.
static RefShort castToShort(int value)
          Convert a number to a RefNumber or specified type.
static RefShort castToShort(long value)
          Convert a number to a RefNumber or specified type.
static RefShort castToShort(java.lang.Object value)
          Convert a Object to a RefNumber or specified type.
static RefShort castToShort(RefNumber value)
          Convert a Object to a RefNumber or specified type.
static RefShort castToShort(short value)
          Convert a number to a RefNumber or specified type.
 RefUByte castToUByte()
          Convert this RefNumber to a RefNumber of specified type.
static RefUByte castToUByte(byte value)
          Convert a number to a RefNumber or specified type.
static RefUByte castToUByte(double value)
          Convert a number to a RefNumber or specified type.
static RefUByte castToUByte(float value)
          Convert a number to a RefNumber or specified type.
static RefUByte castToUByte(int value)
          Convert a number to a RefNumber or specified type.
static RefUByte castToUByte(long value)
          Convert a number to a RefNumber or specified type.
static RefUByte castToUByte(java.lang.Object value)
          Convert a Object to a RefNumber or specified type.
static RefUByte castToUByte(RefNumber value)
          Convert a Object to a RefNumber or specified type.
static RefUByte castToUByte(short value)
          Convert a number to a RefNumber or specified type.
 RefUInteger castToUInt()
          Convert this RefNumber to a RefNumber of specified type.
static RefUInteger castToUInt(byte value)
          Convert a number to a RefNumber or specified type.
static RefUInteger castToUInt(double value)
          Convert a number to a RefNumber or specified type.
static RefUInteger castToUInt(float value)
          Convert a number to a RefNumber or specified type.
static RefUInteger castToUInt(int value)
          Convert a number to a RefNumber or specified type.
static RefUInteger castToUInt(long value)
          Convert a number to a RefNumber or specified type.
static RefUInteger castToUInt(java.lang.Object value)
          Convert a Object to a RefNumber or specified type.
static RefUInteger castToUInt(RefNumber value)
          Convert a Object to a RefNumber or specified type.
static RefUInteger castToUInt(short value)
          Convert a number to a RefNumber or specified type.
 RefULong castToULong()
          Convert this RefNumber to a RefNumber of specified type.
static RefULong castToULong(byte value)
          Convert a number to a RefNumber or specified type.
static RefULong castToULong(double value)
          Convert a number to a RefNumber or specified type.
static RefULong castToULong(float value)
          Convert a number to a RefNumber or specified type.
static RefULong castToULong(int value)
          Convert a number to a RefNumber or specified type.
static RefULong castToULong(long value)
          Convert a number to a RefNumber or specified type.
static RefULong castToULong(java.lang.Object value)
          Convert a Object to a RefNumber or specified type.
static RefULong castToULong(RefNumber value)
          Convert a Object to a RefNumber or specified type.
static RefULong castToULong(short value)
          Convert a number to a RefNumber or specified type.
 RefUShort castToUShort()
          Convert this RefNumber to a RefNumber of specified type.
static RefUShort castToUShort(byte value)
          Convert a number to a RefNumber or specified type.
static RefUShort castToUShort(double value)
          Convert a number to a RefNumber or specified type.
static RefUShort castToUShort(float value)
          Convert a number to a RefNumber or specified type.
static RefUShort castToUShort(int value)
          Convert a number to a RefNumber or specified type.
static RefUShort castToUShort(long value)
          Convert a number to a RefNumber or specified type.
static RefUShort castToUShort(java.lang.Object value)
          Convert a Object to a RefNumber or specified type.
static RefUShort castToUShort(RefNumber value)
          Convert a Object to a RefNumber or specified type.
static RefUShort castToUShort(short value)
          Convert a number to a RefNumber or specified type.
abstract  RefNumber cloneNumber()
          A clone of this RefNumber.
 RefNumber compliment()
          Perform a binary compliment (~) operation on this RefNumber.
 RefNumber deincrement()
          Deincrement this number.
 RefNumber divide(byte value)
          Divide this number by a number.
 RefNumber divide(double value)
          Divide this number by a number.
 RefNumber divide(float value)
          Divide this number by a number.
 RefNumber divide(int value)
          Divide this number by a number.
 RefNumber divide(long value)
          Divide this number by a number.
 RefNumber divide(java.lang.Object value)
          Divide this number by some value, if the passed object is not of any use then it is ignored.
 RefNumber divide(RefNumber number)
          Divide this number by a reference number.
 RefNumber divide(short value)
          Divide this number by a number.
 boolean equals(byte value)
          Returns true if and only if the argument is of the same value.
 boolean equals(double value)
          Returns true if and only if the argument is of the same value.
 boolean equals(float value)
          Returns true if and only if the argument is of the same value.
 boolean equals(int value)
          Returns true if and only if the argument is of the same value.
 boolean equals(long value)
          Returns true if and only if the argument is of the same value.
 boolean equals(java.lang.Object obj)
          Returns true if and only if the argument is not null and is of the same value.
 boolean equals(RefNumber obj)
          Returns true if and only if the argument is not null and is of the same value.
 boolean equals(short value)
          Returns true if and only if the argument is of the same value.
 boolean greaterThan(byte value)
          Returns true if and only if the argument is greater than this number's value.
 boolean greaterThan(double value)
          Returns true if and only if the argument is greater than this number's value.
 boolean greaterThan(float value)
          Returns true if and only if the argument is greater than this number's value.
 boolean greaterThan(int value)
          Returns true if and only if the argument is greater than this number's value.
 boolean greaterThan(long value)
          Returns true if and only if the argument is greater than this number's value.
 boolean greaterThan(java.lang.Object obj)
          Returns true if and only if the argument is not null and is greater than this number's value.
 boolean greaterThan(RefNumber obj)
          Returns true if and only if the argument is not null and is greater than this number's value.
 boolean greaterThan(short value)
          Returns true if and only if the argument is greater than this number's value.
 boolean greaterThanOrEqual(byte value)
          Returns true if and only if the argument is greater than or equal to this number's value.
 boolean greaterThanOrEqual(double value)
          Returns true if and only if the argument is greater than or equal to this number's value.
 boolean greaterThanOrEqual(float value)
          Returns true if and only if the argument is greater than or equal to this number's value.
 boolean greaterThanOrEqual(int value)
          Returns true if and only if the argument is greater than or equal to this number's value.
 boolean greaterThanOrEqual(long value)
          Returns true if and only if the argument is greater than or equal to this number's value.
 boolean greaterThanOrEqual(java.lang.Object obj)
          Returns true if and only if the argument is not null and is greater than or equal to this number's value.
 boolean greaterThanOrEqual(RefNumber obj)
          Returns true if and only if the argument is not null and is greater than or equal to this number's value.
 boolean greaterThanOrEqual(short value)
          Returns true if and only if the argument is greater than or equal to this number's value.
 RefNumber increment()
          Increment this number.
 boolean isReadOnly()
          If this RefNumber is read only.
 boolean lessThan(byte value)
          Returns true if and only if the argument is less than this number's value.
 boolean lessThan(double value)
          Returns true if and only if the argument is less than this number's value.
 boolean lessThan(float value)
          Returns true if and only if the argument is less than this number's value.
 boolean lessThan(int value)
          Returns true if and only if the argument is less than this number's value.
 boolean lessThan(long value)
          Returns true if and only if the argument is less than this number's value.
 boolean lessThan(java.lang.Object obj)
          Returns true if and only if the argument is not null and is less than this number's value.
 boolean lessThan(RefNumber obj)
          Returns true if and only if the argument is not null and is less than this number's value.
 boolean lessThan(short value)
          Returns true if and only if the argument is less than this number's value.
 boolean lessThanOrEqual(byte value)
          Returns true if and only if the argument is less than or equal to this number's value.
 boolean lessThanOrEqual(double value)
          Returns true if and only if the argument is less than or equal to this number's value.
 boolean lessThanOrEqual(float value)
          Returns true if and only if the argument is less than or equal to this number's value.
 boolean lessThanOrEqual(int value)
          Returns true if and only if the argument is less than or equal to this number's value.
 boolean lessThanOrEqual(long value)
          Returns true if and only if the argument is less than or equal to this number's value.
 boolean lessThanOrEqual(java.lang.Object obj)
          Returns true if and only if the argument is not null and is less than or equal to this number's value.
 boolean lessThanOrEqual(RefNumber obj)
          Returns true if and only if the argument is not null and is less than or equal to this number's value.
 boolean lessThanOrEqual(short value)
          Returns true if and only if the argument is less than or equal to this number's value.
 RefNumber makeFixed()
          Convert this RefNumber to a fixed value.
static RefNumber makeFixed(RefNumber num)
          Convert a RefNumber to a fixed value.
 RefNumber modulus(byte value)
          Divide this number by a number and return the remainder.
 RefNumber modulus(double value)
          Divide this number by a number and return the remainder.
 RefNumber modulus(float value)
          Divide this number by a number and return the remainder.
 RefNumber modulus(int value)
          Divide this number by a number and return the remainder.
 RefNumber modulus(long value)
          Divide this number by a number and return the remainder.
 RefNumber modulus(java.lang.Object value)
          Divide this number by some value, then return the remainder.
 RefNumber modulus(RefNumber number)
          Divide this number by a reference number and return the remainder.
 RefNumber modulus(short value)
          Divide this number by a number and return the remainder.
 RefNumber multiply(byte value)
          Multiply this number by a number.
 RefNumber multiply(double value)
          Multiply this number by a number.
 RefNumber multiply(float value)
          Multiply this number by a number.
 RefNumber multiply(int value)
          Multiply this number by a number.
 RefNumber multiply(long value)
          Multiply this number by a number.
 RefNumber multiply(java.lang.Object value)
          Multiply this number by some value, if the passed object is not of any use then it is ignored.
 RefNumber multiply(RefNumber number)
          Multiply this number by a reference number.
 RefNumber multiply(short value)
          Multiply this number by a number.
 boolean notEquals(byte value)
          Returns true if and only if the argument is not equal to this RefNumber.
 boolean notEquals(double value)
          Returns true if and only if the argument is not equal to this RefNumber.
 boolean notEquals(float value)
          Returns true if and only if the argument is not equal to this RefNumber.
 boolean notEquals(int value)
          Returns true if and only if the argument is not equal to this RefNumber.
 boolean notEquals(long value)
          Returns true if and only if the argument is not equal to this RefNumber.
 boolean notEquals(java.lang.Object obj)
          Returns true if and only if the argument is not equal to this RefNumber.
 boolean notEquals(RefNumber obj)
          Returns true if and only if the argument is not equal to this RefNumber.
 boolean notEquals(short value)
          Returns true if and only if the argument is not equal to this RefNumber.
 RefNumber or(byte value)
          Perform a binary OR (|) operation on this RefNumber.
 RefNumber or(int value)
          Perform a binary OR (|) operation on this RefNumber.
 RefNumber or(long value)
          Perform a binary OR (|) operation on this RefNumber.
 RefNumber or(java.lang.Object value)
          Perform a binary OR (|) operation on this RefNumber using an object.
 RefNumber or(RefNumber number)
          Perform a binary OR (|) operation on this RefNumber using another RefNumber.
 RefNumber or(short value)
          Perform a binary OR (|) operation on this RefNumber.
 RefNumber subtract(byte value)
          Subtract a number from this number.
 RefNumber subtract(double value)
          Subtract a number from this number.
 RefNumber subtract(float value)
          Subtract a number from this number.
 RefNumber subtract(int value)
          Subtract a number from this number.
 RefNumber subtract(long value)
          Subtract a number from this number.
 RefNumber subtract(java.lang.Object value)
          Subtract some value from this number, if the passed object is not of any use then it is ignored.
 RefNumber subtract(RefNumber number)
          Subtract a reference number from this number.
 RefNumber subtract(short value)
          Subtract a number from this number.
 RefNumber xor(byte value)
          Perform a binary XOR (^) operation on this RefNumber.
 RefNumber xor(int value)
          Perform a binary XOR (^) operation on this RefNumber.
 RefNumber xor(long value)
          Perform a binary XOR (^) operation on this RefNumber.
 RefNumber xor(java.lang.Object value)
          Perform a binary XOR (^) operation on this RefNumber using an object.
 RefNumber xor(RefNumber number)
          Perform a binary XOR (^) operation on this RefNumber using another RefNumber.
 RefNumber xor(short value)
          Perform a binary XOR (^) operation on this RefNumber.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BIT_SHIFT_LEFT

public static final int BIT_SHIFT_LEFT
Arithmetic bit-shift left, <<.

See Also:
Constant Field Values

BIT_SHIFT_RIGHT

public static final int BIT_SHIFT_RIGHT
Arithmetic bit-shift right, >>.

See Also:
Constant Field Values

BIT_SHIFT_LEFT_LOGICAL

public static final int BIT_SHIFT_LEFT_LOGICAL
Logical bit-shift left, <<<. This produces the same result as BIT_SHIFT_LEFT.

See Also:
Constant Field Values

BIT_SHIFT_RIGHT_LOGICAL

public static final int BIT_SHIFT_RIGHT_LOGICAL
Logical bit-shift right, >>>. This shifts the value right but ignores the sign.

See Also:
Constant Field Values

_fixed

protected boolean _fixed
Method Detail

isReadOnly

public boolean isReadOnly()
If this RefNumber is read only.

Returns:
true if this RefNumber is read only, false if otherwise.

cloneNumber

public abstract RefNumber cloneNumber()
A clone of this RefNumber. The only component that is not copied is if the number is fixed or not.

Returns:
The clone of this RefNumber.

makeFixed

public static RefNumber makeFixed(RefNumber num)
Convert a RefNumber to a fixed value.

Parameters:
num - The RefNumber to make fixed.
Returns:
The RefNumber fixed.

makeFixed

public RefNumber makeFixed()
Convert this RefNumber to a fixed value. Note, this does not set the current RefNumber to fixed, it clones it then makes the clone fixed.

Returns:
The RefNumber fixed.

increment

public RefNumber increment()
Increment this number.

Returns:
This number. If it is read only then a copy that has been incremented is returned.

deincrement

public RefNumber deincrement()
Deincrement this number.

Returns:
This number. If it is read only then a copy that has been deincremented is returned.

add

public RefNumber add(byte value)
Add a number to this number.

Parameters:
value - The number to add.
Returns:
This number. If it is read only then a copy that has had the number added is returned.

add

public RefNumber add(short value)
Add a number to this number.

Parameters:
value - The number to add.
Returns:
This number. If it is read only then a copy that has had the number added is returned.

add

public RefNumber add(int value)
Add a number to this number.

Parameters:
value - The number to add.
Returns:
This number. If it is read only then a copy that has had the number added is returned.

add

public RefNumber add(long value)
Add a number to this number.

Parameters:
value - The number to add.
Returns:
This number. If it is read only then a copy that has had the number added is returned.

add

public RefNumber add(float value)
Add a number to this number.

Parameters:
value - The number to add.
Returns:
This number. If it is read only then a copy that has had the number added is returned.

add

public RefNumber add(double value)
Add a number to this number.

Parameters:
value - The number to add.
Returns:
This number. If it is read only then a copy that has had the number added is returned.

add

public RefNumber add(java.lang.Object value)
Add some value to this number, if the passed object is not of any use then it is ignored.

Parameters:
value - The Object to add, examples of supported types are RefByte and Byte.
Returns:
This number. If it is read only then a copy that has had the number added is returned.

add

public RefNumber add(RefNumber number)
Add a reference number to this number.

Parameters:
number - The RefNumber to add, if this is null than it is ignored.
Returns:
This number. If it is read only then a copy that has had the number added is returned.

subtract

public RefNumber subtract(byte value)
Subtract a number from this number.

Parameters:
value - The number to subtract.
Returns:
This number. If it is read only then a copy that has had the number subtracted is returned.

subtract

public RefNumber subtract(short value)
Subtract a number from this number.

Parameters:
value - The number to subtract.
Returns:
This number. If it is read only then a copy that has had the number subtracted is returned.

subtract

public RefNumber subtract(int value)
Subtract a number from this number.

Parameters:
value - The number to subtract.
Returns:
This number. If it is read only then a copy that has had the number subtracted is returned.

subtract

public RefNumber subtract(long value)
Subtract a number from this number.

Parameters:
value - The number to subtract.
Returns:
This number. If it is read only then a copy that has had the number subtracted is returned.

subtract

public RefNumber subtract(float value)
Subtract a number from this number.

Parameters:
value - The number to subtract.
Returns:
This number. If it is read only then a copy that has had the number subtracted is returned.

subtract

public RefNumber subtract(double value)
Subtract a number from this number.

Parameters:
value - The number to subtract.
Returns:
This number. If it is read only then a copy that has had the number subtracted is returned.

subtract

public RefNumber subtract(java.lang.Object value)
Subtract some value from this number, if the passed object is not of any use then it is ignored.

Parameters:
value - The Object to subtract, examples of supported types are RefByte and Byte.
Returns:
This number. If it is read only then a copy that has had the number subtracted is returned.

subtract

public RefNumber subtract(RefNumber number)
Subtract a reference number from this number.

Parameters:
number - The RefNumber to subtract, if this is null than it is ignored.
Returns:
This number. If it is read only then a copy that has had the number subtracted is returned.

multiply

public RefNumber multiply(byte value)
Multiply this number by a number.

Parameters:
value - The number to multiply with.
Returns:
This number. If it is read only then a copy that has had the number multiplied is returned.

multiply

public RefNumber multiply(short value)
Multiply this number by a number.

Parameters:
value - The number to multiply with.
Returns:
This number. If it is read only then a copy that has had the number multiplied is returned.

multiply

public RefNumber multiply(int value)
Multiply this number by a number.

Parameters:
value - The number to multiply with.
Returns:
This number. If it is read only then a copy that has had the number multiplied is returned.

multiply

public RefNumber multiply(long value)
Multiply this number by a number.

Parameters:
value - The number to multiply with.
Returns:
This number. If it is read only then a copy that has had the number multiplied is returned.

multiply

public RefNumber multiply(float value)
Multiply this number by a number.

Parameters:
value - The number to multiply with.
Returns:
This number. If it is read only then a copy that has had the number multiplied is returned.

multiply

public RefNumber multiply(double value)
Multiply this number by a number.

Parameters:
value - The number to multiply with.
Returns:
This number. If it is read only then a copy that has had the number multiplied is returned.

multiply

public RefNumber multiply(java.lang.Object value)
Multiply this number by some value, if the passed object is not of any use then it is ignored.

Parameters:
value - The Object to multiply with, examples of supported types are RefByte and Byte.
Returns:
This number. If it is read only then a copy that has had the number multiplied is returned.

multiply

public RefNumber multiply(RefNumber number)
Multiply this number by a reference number.

Parameters:
number - The RefNumber to multiply with, if this is null than it is ignored.
Returns:
This number. If it is read only then a copy that has had the number multiplied is returned.

divide

public RefNumber divide(byte value)
Divide this number by a number.

Parameters:
value - The number to divide with.
Returns:
This number. If it is read only then a copy that has had the number divided is returned.

divide

public RefNumber divide(short value)
Divide this number by a number.

Parameters:
value - The number to divide with.
Returns:
This number. If it is read only then a copy that has had the number divided is returned.

divide

public RefNumber divide(int value)
Divide this number by a number.

Parameters:
value - The number to divide with.
Returns:
This number. If it is read only then a copy that has had the number divided is returned.

divide

public RefNumber divide(long value)
Divide this number by a number.

Parameters:
value - The number to divide with.
Returns:
This number. If it is read only then a copy that has had the number divided is returned.

divide

public RefNumber divide(float value)
Divide this number by a number.

Parameters:
value - The number to divide with.
Returns:
This number. If it is read only then a copy that has had the number divided is returned.

divide

public RefNumber divide(double value)
Divide this number by a number.

Parameters:
value - The number to divide with.
Returns:
This number. If it is read only then a copy that has had the number divided is returned.

divide

public RefNumber divide(java.lang.Object value)
Divide this number by some value, if the passed object is not of any use then it is ignored.

Parameters:
value - The Object to divide with, examples of supported types are RefByte and Byte.
Returns:
This number. If it is read only then a copy that has had the number divided is returned.

divide

public RefNumber divide(RefNumber number)
Divide this number by a reference number.

Parameters:
number - The RefNumber to divide with, if this is null than it is ignored.
Returns:
This number. If it is read only then a copy that has had the number divided is returned.

modulus

public RefNumber modulus(byte value)
Divide this number by a number and return the remainder. Thus a modulus operation.

Parameters:
value - The number to divide with.
Returns:
This number. If it is read only then a copy that has had the number divided and the remainder is returned.

modulus

public RefNumber modulus(short value)
Divide this number by a number and return the remainder. Thus a modulus operation.

Parameters:
value - The number to divide with.
Returns:
This number. If it is read only then a copy that has had the number divided and the remainder is returned.

modulus

public RefNumber modulus(int value)
Divide this number by a number and return the remainder. Thus a modulus operation.

Parameters:
value - The number to divide with.
Returns:
This number. If it is read only then a copy that has had the number divided and the remainder is returned.

modulus

public RefNumber modulus(long value)
Divide this number by a number and return the remainder. Thus a modulus operation.

Parameters:
value - The number to divide with.
Returns:
This number. If it is read only then a copy that has had the number divided and the remainder is returned.

modulus

public RefNumber modulus(float value)
Divide this number by a number and return the remainder. Thus a modulus operation.

Parameters:
value - The number to divide with.
Returns:
This number. If it is read only then a copy that has had the number divided and the remainder is returned.

modulus

public RefNumber modulus(double value)
Divide this number by a number and return the remainder. Thus a modulus operation.

Parameters:
value - The number to divide with.
Returns:
This number. If it is read only then a copy that has had the number divided and the remainder is returned.

modulus

public RefNumber modulus(java.lang.Object value)
Divide this number by some value, then return the remainder. If the passed object is not of any use then it is ignored.

Parameters:
value - The Object to divide with, examples of supported types are RefByte and Byte.
Returns:
This number. If it is read only then a copy that has had the number divided and the remainder is returned.

modulus

public RefNumber modulus(RefNumber number)
Divide this number by a reference number and return the remainder.

Parameters:
number - The RefNumber to divide with, if this is null than it is ignored.
Returns:
This number. If it is read only then a copy that has had the number divided and the remainder is returned.

and

public RefNumber and(byte value)
Perform a binary AND (&) operation on this RefNumber. Can only be done using integer data types.

Parameters:
value - The number to AND with.
Returns:
This RefNumber after the AND operation has been performed on it.

and

public RefNumber and(short value)
Perform a binary AND (&) operation on this RefNumber. Can only be done using integer data types.

Parameters:
value - The number to AND with.
Returns:
This RefNumber after the AND operation has been performed on it.

and

public RefNumber and(int value)
Perform a binary AND (&) operation on this RefNumber. Can only be done using integer data types.

Parameters:
value - The number to AND with.
Returns:
This RefNumber after the AND operation has been performed on it.

and

public RefNumber and(long value)
Perform a binary AND (&) operation on this RefNumber. Can only be done using integer data types.

Parameters:
value - The number to AND with.
Returns:
This RefNumber after the AND operation has been performed on it.

and

public RefNumber and(java.lang.Object value)
Perform a binary AND (&) operation on this RefNumber using an object. Can only be done using integer data types.

Parameters:
value - The number to use as a mask. This number cannot be a floating-point number such as RefFloat or Double. If it is a floating-point or any other unsupported type then the operation is ignored.
Returns:
This RefNumber after the AND operation has been performed on it.

and

public RefNumber and(RefNumber number)
Perform a binary AND (&) operation on this RefNumber using another RefNumber. Can only be done using integer data types.

Parameters:
number - The number to use as a mask. This number cannot be a floating-point number such as RefFloat or RefDouble. If it is then the operation is ignored.
Returns:
This RefNumber after the AND operation has been performed on it.

or

public RefNumber or(byte value)
Perform a binary OR (|) operation on this RefNumber. Can only be done using integer data types.

Parameters:
value - The number to OR with.
Returns:
This RefNumber after the OR operation has been performed on it.

or

public RefNumber or(short value)
Perform a binary OR (|) operation on this RefNumber. Can only be done using integer data types.

Parameters:
value - The number to OR with.
Returns:
This RefNumber after the OR operation has been performed on it.

or

public RefNumber or(int value)
Perform a binary OR (|) operation on this RefNumber. Can only be done using integer data types.

Parameters:
value - The number to OR with.
Returns:
This RefNumber after the OR operation has been performed on it.

or

public RefNumber or(long value)
Perform a binary OR (|) operation on this RefNumber. Can only be done using integer data types.

Parameters:
value - The number to OR with.
Returns:
This RefNumber after the OR operation has been performed on it.

or

public RefNumber or(java.lang.Object value)
Perform a binary OR (|) operation on this RefNumber using an object. Can only be done using integer data types.

Parameters:
value - The number to combine. This number cannot be a floating-point number such as RefFloat or Double. If it is a floating-point or any other unsupported type then the operation is ignored.
Returns:
This RefNumber after the OR operation has been performed on it.

or

public RefNumber or(RefNumber number)
Perform a binary OR (|) operation on this RefNumber using another RefNumber. Can only be done using integer data types.

Parameters:
number - The number to combine. This number cannot be a floating-point number such as RefFloat or RefDouble. If it is then the operation is ignored.
Returns:
This RefNumber after the OR operation has been performed on it.

xor

public RefNumber xor(byte value)
Perform a binary XOR (^) operation on this RefNumber. Can only be done using integer data types.

Parameters:
value - The number to OR with.
Returns:
This RefNumber after the XOR operation has been performed on it.

xor

public RefNumber xor(short value)
Perform a binary XOR (^) operation on this RefNumber. Can only be done using integer data types.

Parameters:
value - The number to OR with.
Returns:
This RefNumber after the XOR operation has been performed on it.

xor

public RefNumber xor(int value)
Perform a binary XOR (^) operation on this RefNumber. Can only be done using integer data types.

Parameters:
value - The number to OR with.
Returns:
This RefNumber after the XOR operation has been performed on it.

xor

public RefNumber xor(long value)
Perform a binary XOR (^) operation on this RefNumber. Can only be done using integer data types.

Parameters:
value - The number to OR with.
Returns:
This RefNumber after the XOR operation has been performed on it.

xor

public RefNumber xor(java.lang.Object value)
Perform a binary XOR (^) operation on this RefNumber using an object. Can only be done using integer data types.

Parameters:
value - The number to exclusively-combine. This number cannot be a floating-point number such as RefFloat or Double. If it is a floating-point or any other unsupported type then the operation is ignored.
Returns:
This RefNumber after the XOR operation has been performed on it.

xor

public RefNumber xor(RefNumber number)
Perform a binary XOR (^) operation on this RefNumber using another RefNumber. Can only be done using integer data types.

Parameters:
number - The number to exclusively-combine. This number cannot be a floating-point number such as RefFloat or RefDouble. If it is then the operation is ignored.
Returns:
This RefNumber after the XOR operation has been performed on it.

compliment

public RefNumber compliment()
Perform a binary compliment (~) operation on this RefNumber. This cannot be done to RefFloat or RefDouble.

Returns:
This RefNumber after the compliment operation has been performed on it.

bitShift

public RefNumber bitShift(byte value,
                          int op)
Perform a bit-shift operation on this RefNumber. Can only be done using integer data types.

Parameters:
value - The number to bit-shift with.
op - The shift operation to occur.
Returns:
This RefNumber after the bit-shift operation has been performed on it.

bitShift

public RefNumber bitShift(short value,
                          int op)
Perform a bit-shift operation on this RefNumber. Can only be done using integer data types.

Parameters:
value - The number to bit-shift with.
op - The shift operation to occur.
Returns:
This RefNumber after the bit-shift operation has been performed on it.

bitShift

public RefNumber bitShift(int value,
                          int op)
Perform a bit-shift operation on this RefNumber. Can only be done using integer data types.

Parameters:
value - The number to bit-shift with.
op - The shift operation to occur.
Returns:
This RefNumber after the bit-shift operation has been performed on it.

bitShift

public RefNumber bitShift(long value,
                          int op)
Perform a bit-shift operation on this RefNumber. Can only be done using integer data types.

Parameters:
value - The number to bit-shift with.
op - The shift operation to occur.
Returns:
This RefNumber after the bit-shift operation has been performed on it.

bitShift

public RefNumber bitShift(java.lang.Object value,
                          int op)
Perform a bit-shift operation on this RefNumber using an object. Can only be done using integer data types.

Parameters:
value - The number to bit-shift. This number cannot be a floating-point number such as RefFloat or Double. If it is a floating-point or any other unsupported type then the operation is ignored.
op - The shift operation to occur.
Returns:
This RefNumber after the bit-shift operation has been performed on it.

bitShift

public RefNumber bitShift(RefNumber number,
                          int op)
Perform a bit-shift operation on this RefNumber using another RefNumber. Can only be done using integer data types.

Parameters:
number - The number to bit-shift. This number cannot be a floating-point number such as RefFloat or RefDouble. If it is then the operation is ignored.
op - The shift operation to occur.
Returns:
This RefNumber after the bit-shift operation has been performed on it.

equals

public boolean equals(byte value)
Returns true if and only if the argument is of the same value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is of the same value as this RefNumber, false if otherwise.

equals

public boolean equals(short value)
Returns true if and only if the argument is of the same value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is of the same value as this RefNumber, false if otherwise.

equals

public boolean equals(int value)
Returns true if and only if the argument is of the same value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is of the same value as this RefNumber, false if otherwise.

equals

public boolean equals(long value)
Returns true if and only if the argument is of the same value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is of the same value as this RefNumber, false if otherwise.

equals

public boolean equals(float value)
Returns true if and only if the argument is of the same value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is of the same value as this RefNumber, false if otherwise.

equals

public boolean equals(double value)
Returns true if and only if the argument is of the same value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is of the same value as this RefNumber, false if otherwise.

equals

public boolean equals(java.lang.Object obj)
Returns true if and only if the argument is not null and is of the same value.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The object to compare.
Returns:
true if the object is of the same value as this RefNumber, false if obj is null, or not a supported number.

equals

public boolean equals(RefNumber obj)
Returns true if and only if the argument is not null and is of the same value.

Parameters:
obj - The RefNumber to compare.
Returns:
true if the object is of the same value as this RefNumber, false if obj is null, or not a supported number.

notEquals

public boolean notEquals(byte value)
Returns true if and only if the argument is not equal to this RefNumber.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is not equal to this RefNumber, false if otherwise.

notEquals

public boolean notEquals(short value)
Returns true if and only if the argument is not equal to this RefNumber.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is not equal to this RefNumber, false if otherwise.

notEquals

public boolean notEquals(int value)
Returns true if and only if the argument is not equal to this RefNumber.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is not equal to this RefNumber, false if otherwise.

notEquals

public boolean notEquals(long value)
Returns true if and only if the argument is not equal to this RefNumber.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is not equal to this RefNumber, false if otherwise.

notEquals

public boolean notEquals(float value)
Returns true if and only if the argument is not equal to this RefNumber.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is not equal to this RefNumber, false if otherwise.

notEquals

public boolean notEquals(double value)
Returns true if and only if the argument is not equal to this RefNumber.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is not equal to this RefNumber, false if otherwise.

notEquals

public boolean notEquals(java.lang.Object obj)
Returns true if and only if the argument is not equal to this RefNumber.

Parameters:
obj - The object to compare.
Returns:
true if the object is not equal to this RefNumber, false if otherwise.

notEquals

public boolean notEquals(RefNumber obj)
Returns true if and only if the argument is not equal to this RefNumber.

Parameters:
obj - The RefNumber to compare.
Returns:
true if the object is not equal to this RefNumber, false if otherwise.

lessThan

public boolean lessThan(byte value)
Returns true if and only if the argument is less than this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is less than the value of this RefNumber, false if otherwise.

lessThan

public boolean lessThan(short value)
Returns true if and only if the argument is less than this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is less than the value of this RefNumber, false if otherwise.

lessThan

public boolean lessThan(int value)
Returns true if and only if the argument is less than this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is less than the value of this RefNumber, false if otherwise.

lessThan

public boolean lessThan(long value)
Returns true if and only if the argument is less than this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is less than the value of this RefNumber, false if otherwise.

lessThan

public boolean lessThan(float value)
Returns true if and only if the argument is less than this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is less than the value of this RefNumber, false if otherwise.

lessThan

public boolean lessThan(double value)
Returns true if and only if the argument is less than this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is less than the value of this RefNumber, false if otherwise.

lessThan

public boolean lessThan(java.lang.Object obj)
Returns true if and only if the argument is not null and is less than this number's value.

Parameters:
obj - The object to compare.
Returns:
true if the object is less than the value of this RefNumber, false if obj is null, or not a supported number.

lessThan

public boolean lessThan(RefNumber obj)
Returns true if and only if the argument is not null and is less than this number's value.

Parameters:
obj - The RefNumber to compare.
Returns:
true if the object is less than the value of this RefNumber, false if obj is null, or not a supported number.

greaterThan

public boolean greaterThan(byte value)
Returns true if and only if the argument is greater than this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is greater than the value of this RefNumber, false if otherwise.

greaterThan

public boolean greaterThan(short value)
Returns true if and only if the argument is greater than this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is greater than the value of this RefNumber, false if otherwise.

greaterThan

public boolean greaterThan(int value)
Returns true if and only if the argument is greater than this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is greater than the value of this RefNumber, false if otherwise.

greaterThan

public boolean greaterThan(long value)
Returns true if and only if the argument is greater than this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is greater than the value of this RefNumber, false if otherwise.

greaterThan

public boolean greaterThan(float value)
Returns true if and only if the argument is greater than this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is greater than the value of this RefNumber, false if otherwise.

greaterThan

public boolean greaterThan(double value)
Returns true if and only if the argument is greater than this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is greater than the value of this RefNumber, false if otherwise.

greaterThan

public boolean greaterThan(java.lang.Object obj)
Returns true if and only if the argument is not null and is greater than this number's value.

Parameters:
obj - The object to compare.
Returns:
true if the object is greater than the value of this RefNumber, false if obj is null, or not a supported number.

greaterThan

public boolean greaterThan(RefNumber obj)
Returns true if and only if the argument is not null and is greater than this number's value.

Parameters:
obj - The RefNumber to compare.
Returns:
true if the object is greater than the value of this RefNumber, false if obj is null, or not a supported number.

lessThanOrEqual

public boolean lessThanOrEqual(byte value)
Returns true if and only if the argument is less than or equal to this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is less than or equal to the value of this RefNumber, false if otherwise.

lessThanOrEqual

public boolean lessThanOrEqual(short value)
Returns true if and only if the argument is less than or equal to this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is less than or equal to the value of this RefNumber, false if otherwise.

lessThanOrEqual

public boolean lessThanOrEqual(int value)
Returns true if and only if the argument is less than or equal to this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is less than or equal to the value of this RefNumber, false if otherwise.

lessThanOrEqual

public boolean lessThanOrEqual(long value)
Returns true if and only if the argument is less than or equal to this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is less than or equal to the value of this RefNumber, false if otherwise.

lessThanOrEqual

public boolean lessThanOrEqual(float value)
Returns true if and only if the argument is less than or equal to this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is less than or equal to the value of this RefNumber, false if otherwise.

lessThanOrEqual

public boolean lessThanOrEqual(double value)
Returns true if and only if the argument is less than or equal to this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is less than or equal to the value of this RefNumber, false if otherwise.

lessThanOrEqual

public boolean lessThanOrEqual(java.lang.Object obj)
Returns true if and only if the argument is not null and is less than or equal to this number's value.

Parameters:
obj - The object to compare.
Returns:
true if the object is less than or equal to the value of this RefNumber, false if obj is null, or not a supported number.

lessThanOrEqual

public boolean lessThanOrEqual(RefNumber obj)
Returns true if and only if the argument is not null and is less than or equal to this number's value.

Parameters:
obj - The RefNumber to compare.
Returns:
true if the object is of less than or equal to the value of this RefNumber, false if obj is null, or not a supported number.

greaterThanOrEqual

public boolean greaterThanOrEqual(byte value)
Returns true if and only if the argument is greater than or equal to this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is greater than or equal to the value of this RefNumber, false if otherwise.

greaterThanOrEqual

public boolean greaterThanOrEqual(short value)
Returns true if and only if the argument is greater than or equal to this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is greater than or equal to the value of this RefNumber, false if otherwise.

greaterThanOrEqual

public boolean greaterThanOrEqual(int value)
Returns true if and only if the argument is greater than or equal to this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is greater than or equal to the value of this RefNumber, false if otherwise.

greaterThanOrEqual

public boolean greaterThanOrEqual(long value)
Returns true if and only if the argument is greater than or equal to this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is greater than or equal to the value of this RefNumber, false if otherwise.

greaterThanOrEqual

public boolean greaterThanOrEqual(float value)
Returns true if and only if the argument is greater than or equal to this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is greater than or equal to the value of this RefNumber, false if otherwise.

greaterThanOrEqual

public boolean greaterThanOrEqual(double value)
Returns true if and only if the argument is greater than or equal to this number's value.

Parameters:
obj - The primitive to compare.
Returns:
true if the primitive is greater than or equal to the value of this RefNumber, false if otherwise.

greaterThanOrEqual

public boolean greaterThanOrEqual(java.lang.Object obj)
Returns true if and only if the argument is not null and is greater than or equal to this number's value.

Parameters:
obj - The object to compare.
Returns:
true if the object is greater than or equal to the value of this RefNumber, false if obj is null, or not a supported number.

greaterThanOrEqual

public boolean greaterThanOrEqual(RefNumber obj)
Returns true if and only if the argument is not null and is greater than or equal to this number's value.

Parameters:
obj - The RefNumber to compare.
Returns:
true if the object is greater than or equal to the value of this RefNumber, false if obj is null, or not a supported number.

castToByte

public static RefByte castToByte(byte value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToByte

public static RefByte castToByte(short value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToByte

public static RefByte castToByte(int value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToByte

public static RefByte castToByte(long value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToByte

public static RefByte castToByte(float value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToByte

public static RefByte castToByte(double value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToByte

public static RefByte castToByte(java.lang.Object value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToByte

public RefByte castToByte()
Convert this RefNumber to a RefNumber of specified type.

Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToByte

public static RefByte castToByte(RefNumber value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToShort

public static RefShort castToShort(byte value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToShort

public static RefShort castToShort(short value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToShort

public static RefShort castToShort(int value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToShort

public static RefShort castToShort(long value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToShort

public static RefShort castToShort(float value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToShort

public static RefShort castToShort(double value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToShort

public static RefShort castToShort(java.lang.Object value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToShort

public RefShort castToShort()
Convert this RefNumber to a RefNumber of specified type.

Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToShort

public static RefShort castToShort(RefNumber value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToInt

public static RefInteger castToInt(byte value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToInt

public static RefInteger castToInt(short value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToInt

public static RefInteger castToInt(int value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToInt

public static RefInteger castToInt(long value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToInt

public static RefInteger castToInt(float value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToInt

public static RefInteger castToInt(double value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToInt

public static RefInteger castToInt(java.lang.Object value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToInt

public RefInteger castToInt()
Convert this RefNumber to a RefNumber of specified type.

Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToInt

public static RefInteger castToInt(RefNumber value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToLong

public static RefLong castToLong(byte value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToLong

public static RefLong castToLong(short value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToLong

public static RefLong castToLong(int value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToLong

public static RefLong castToLong(long value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToLong

public static RefLong castToLong(float value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToLong

public static RefLong castToLong(double value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToLong

public static RefLong castToLong(java.lang.Object value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToLong

public RefLong castToLong()
Convert this RefNumber to a RefNumber of specified type.

Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToLong

public static RefLong castToLong(RefNumber value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToFloat

public static RefFloat castToFloat(byte value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToFloat

public static RefFloat castToFloat(short value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToFloat

public static RefFloat castToFloat(int value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToFloat

public static RefFloat castToFloat(long value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToFloat

public static RefFloat castToFloat(float value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToFloat

public static RefFloat castToFloat(double value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToFloat

public static RefFloat castToFloat(java.lang.Object value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToFloat

public RefFloat castToFloat()
Convert this RefNumber to a RefNumber of specified type.

Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToFloat

public static RefFloat castToFloat(RefNumber value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToDouble

public static RefDouble castToDouble(byte value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToDouble

public static RefDouble castToDouble(short value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToDouble

public static RefDouble castToDouble(int value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToDouble

public static RefDouble castToDouble(long value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToDouble

public static RefDouble castToDouble(float value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToDouble

public static RefDouble castToDouble(double value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToDouble

public static RefDouble castToDouble(java.lang.Object value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToDouble

public RefDouble castToDouble()
Convert this RefNumber to a RefNumber of specified type.

Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToDouble

public static RefDouble castToDouble(RefNumber value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToUByte

public static RefUByte castToUByte(byte value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToUByte

public static RefUByte castToUByte(short value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToUByte

public static RefUByte castToUByte(int value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToUByte

public static RefUByte castToUByte(long value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToUByte

public static RefUByte castToUByte(float value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToUByte

public static RefUByte castToUByte(double value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToUByte

public static RefUByte castToUByte(java.lang.Object value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToUByte

public RefUByte castToUByte()
Convert this RefNumber to a RefNumber of specified type.

Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToUByte

public static RefUByte castToUByte(RefNumber value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToUShort

public static RefUShort castToUShort(byte value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToUShort

public static RefUShort castToUShort(short value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToUShort

public static RefUShort castToUShort(int value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToUShort

public static RefUShort castToUShort(long value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToUShort

public static RefUShort castToUShort(float value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToUShort

public static RefUShort castToUShort(double value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToUShort

public static RefUShort castToUShort(java.lang.Object value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToUShort

public RefUShort castToUShort()
Convert this RefNumber to a RefNumber of specified type.

Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToUShort

public static RefUShort castToUShort(RefNumber value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToUInt

public static RefUInteger castToUInt(byte value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToUInt

public static RefUInteger castToUInt(short value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToUInt

public static RefUInteger castToUInt(int value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToUInt

public static RefUInteger castToUInt(long value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToUInt

public static RefUInteger castToUInt(float value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToUInt

public static RefUInteger castToUInt(double value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToUInt

public static RefUInteger castToUInt(java.lang.Object value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToUInt

public RefUInteger castToUInt()
Convert this RefNumber to a RefNumber of specified type.

Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToUInt

public static RefUInteger castToUInt(RefNumber value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToULong

public static RefULong castToULong(byte value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToULong

public static RefULong castToULong(short value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToULong

public static RefULong castToULong(int value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToULong

public static RefULong castToULong(long value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToULong

public static RefULong castToULong(float value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToULong

public static RefULong castToULong(double value)
Convert a number to a RefNumber or specified type.

Parameters:
value - The value to convert to a RefNumber.
Returns:
The specified RefNumber.

castToULong

public static RefULong castToULong(java.lang.Object value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToULong

public RefULong castToULong()
Convert this RefNumber to a RefNumber of specified type.

Returns:
The specified RefNumber, or null if value is null or an unsupported type.

castToULong

public static RefULong castToULong(RefNumber value)
Convert a Object to a RefNumber or specified type.

Parameters:
value - The Object to convert to a RefNumber.
Returns:
The specified RefNumber, or null if value is null or an unsupported type.