jodd.mutable
Class MutableShort

java.lang.Object
  extended by java.lang.Number
      extended by jodd.mutable.MutableShort
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public final class MutableShort
extends java.lang.Number
implements java.lang.Comparable

A mutable short wrapper.

See Also:
Serialized Form

Field Summary
 short value
          The mutable value.
 
Constructor Summary
MutableShort()
           
MutableShort(short value)
           
MutableShort(java.lang.String value)
           
 
Method Summary
 int compareTo(java.lang.Object obj)
          Compares value of two same instances.
 double doubleValue()
          Returns the value as a double.
 boolean equals(java.lang.Object obj)
          Compares this object to the specified object.
 float floatValue()
          Returns the value as a float.
 short getValue()
          Returns mutable value.
 int hashCode()
          Returns a hashcode for this value.
 int intValue()
          Returns the value as a int.
 long longValue()
          Returns the value as a long.
 void setValue(java.lang.Number value)
          Sets mutable value from a Number.
 void setValue(short value)
          Sets mutable value.
 java.lang.String toString()
          Stringify the value.
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

value

public short value
The mutable value.

Constructor Detail

MutableShort

public MutableShort()

MutableShort

public MutableShort(short value)

MutableShort

public MutableShort(java.lang.String value)
Method Detail

getValue

public short getValue()
Returns mutable value.


setValue

public void setValue(short value)
Sets mutable value.


setValue

public void setValue(java.lang.Number value)
Sets mutable value from a Number.


toString

public java.lang.String toString()
Stringify the value.

Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Returns a hashcode for this value.

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Compares this object to the specified object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare with.
Returns:
true if the objects are the same; false otherwise.

intValue

public int intValue()
Returns the value as a int.

Specified by:
intValue in class java.lang.Number

longValue

public long longValue()
Returns the value as a long.

Specified by:
longValue in class java.lang.Number

floatValue

public float floatValue()
Returns the value as a float.

Specified by:
floatValue in class java.lang.Number

doubleValue

public double doubleValue()
Returns the value as a double.

Specified by:
doubleValue in class java.lang.Number

compareTo

public int compareTo(java.lang.Object obj)
Compares value of two same instances.

Specified by:
compareTo in interface java.lang.Comparable


Copyright ©2008 Jodd Team