rebuild.util.ref
Class RefShort

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

public final class RefShort
extends RefNumber

Reference Short is the same as Short but allows you to set the short without creating a new RefShort.

Since:
BBX 1.1.0

Field Summary
static short MAX_VALUE
          The largest value of type short.
static short MIN_VALUE
          The smallest value of type short.
 
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
RefShort()
          Create a new RefShort set to the default of 0.
RefShort(short value)
          Create a new RefShort using a short primitive.
RefShort(java.lang.Short value)
          Create a new RefShort using a Short.
RefShort(short value, boolean fixed)
          Create a new RefShort using a short primitive.
RefShort(java.lang.Short value, boolean fixed)
          Create a new RefShort using a Short.
 
Method Summary
 RefShort 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 RefShort object.
static short parseShort(java.lang.String s)
          Assuming the specified String represents a short, returns that short's value.
static short parseShort(java.lang.String s, int radix)
          Assuming the specified String represents a short, returns that short's value.
 RefShort setValue(short value)
          Set the value of this RefShort object with a short primitive.
 RefShort setValue(java.lang.Short value)
          Set the value of this RefShort object with a Short.
 short shortValue()
          Returns Returns the value of this RefShort as an short.
 java.lang.String toString()
          Returns a String object representing this RefShort's value.
 
Methods inherited from class rebuild.util.ref.RefNumber
add, add, add, add, add, add, add, add, and, and, and, and, and, and, bitShift, bitShift, bitShift, bitShift, bitShift, bitShift, castToByte, castToByte, castToByte, castToByte, castToByte, castToByte, castToByte, castToByte, castToByte, castToDouble, castToDouble, castToDouble, castToDouble, castToDouble, castToDouble, castToDouble, castToDouble, castToDouble, castToFloat, castToFloat, castToFloat, castToFloat, castToFloat, castToFloat, castToFloat, castToFloat, castToFloat, castToInt, castToInt, castToInt, castToInt, castToInt, castToInt, castToInt, castToInt, castToInt, castToLong, castToLong, castToLong, castToLong, castToLong, castToLong, castToLong, castToLong, castToLong, castToShort, castToShort, castToShort, castToShort, castToShort, castToShort, castToShort, castToShort, castToShort, castToUByte, castToUByte, castToUByte, castToUByte, castToUByte, castToUByte, castToUByte, castToUByte, castToUByte, castToUInt, castToUInt, castToUInt, castToUInt, castToUInt, castToUInt, castToUInt, castToUInt, castToUInt, castToULong, castToULong, castToULong, castToULong, castToULong, castToULong, castToULong, castToULong, castToULong, castToUShort, castToUShort, castToUShort, castToUShort, castToUShort, castToUShort, castToUShort, castToUShort, castToUShort, compliment, deincrement, divide, divide, divide, divide, divide, divide, divide, divide, equals, equals, equals, equals, equals, equals, equals, equals, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThanOrEqual, greaterThanOrEqual, greaterThanOrEqual, greaterThanOrEqual, greaterThanOrEqual, greaterThanOrEqual, greaterThanOrEqual, greaterThanOrEqual, increment, isReadOnly, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThanOrEqual, lessThanOrEqual, lessThanOrEqual, lessThanOrEqual, lessThanOrEqual, lessThanOrEqual, lessThanOrEqual, lessThanOrEqual, makeFixed, makeFixed, modulus, modulus, modulus, modulus, modulus, modulus, modulus, modulus, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, notEquals, notEquals, notEquals, notEquals, notEquals, notEquals, notEquals, notEquals, or, or, or, or, or, or, subtract, subtract, subtract, subtract, subtract, subtract, subtract, subtract, xor, xor, xor, xor, xor, xor
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_VALUE

public static final short MAX_VALUE
The largest value of type short.

See Also:
Constant Field Values

MIN_VALUE

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

See Also:
Constant Field Values
Constructor Detail

RefShort

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


RefShort

public RefShort(short value)
Create a new RefShort using a short primitive.

Parameters:
value - The short primitive to set this RefShort with.

RefShort

public RefShort(short value,
                boolean fixed)
Create a new RefShort using a short primitive.

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

RefShort

public RefShort(java.lang.Short value)
Create a new RefShort using a Short.

Parameters:
value - The Short to set this RefShort with.

RefShort

public RefShort(java.lang.Short value,
                boolean fixed)
Create a new RefShort using a Short.

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

shortValue

public short shortValue()
Returns Returns the value of this RefShort as an short.

Returns:
The short value represented by this object.

setValue

public RefShort setValue(short value)
Set the value of this RefShort object with a short primitive.

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

setValue

public RefShort setValue(java.lang.Short value)
Set the value of this RefShort object with a Short.

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

hashCode

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

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

parseShort

public static short parseShort(java.lang.String s)
Assuming the specified String represents a short, returns that short's value.

Parameters:
s - The String containing the short.
Returns:
short the value represented by the specified string.
Throws:
java.lang.NumberFormatException - If the string does not contain a parsable short.

parseShort

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

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

clone

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

Returns:
A clone of the current RefShort.

cloneNumber

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

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