jodd.mutable
Class MutableLong

java.lang.Object
  extended by java.lang.Number
      extended by jodd.mutable.MutableLong
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<MutableLong>

public final class MutableLong
extends java.lang.Number
implements java.lang.Comparable<MutableLong>, java.lang.Cloneable

A mutable long wrapper.

See Also:
Serialized Form

Field Summary
 long value
          The mutable value.
 
Constructor Summary
MutableLong()
           
MutableLong(long value)
           
MutableLong(java.lang.Number number)
           
MutableLong(java.lang.String value)
           
 
Method Summary
 MutableLong clone()
          Clones object.
 int compareTo(MutableLong other)
          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.
 long 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(long value)
          Sets mutable value.
 void setValue(java.lang.Number value)
          Sets mutable value from a Number.
 java.lang.String toString()
          Stringify the value.
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

value

public long value
The mutable value.

Constructor Detail

MutableLong

public MutableLong()

MutableLong

public MutableLong(long value)

MutableLong

public MutableLong(java.lang.String value)

MutableLong

public MutableLong(java.lang.Number number)
Method Detail

getValue

public long getValue()
Returns mutable value.


setValue

public void setValue(long 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(MutableLong other)
Compares value of two same instances.

Specified by:
compareTo in interface java.lang.Comparable<MutableLong>

clone

public MutableLong clone()
Clones object.

Overrides:
clone in class java.lang.Object


Copyright © 2003-2012 Jodd Team