Package org.apache.commons.lang.mutable
Class MutableObject
java.lang.Object
org.apache.commons.lang.mutable.MutableObject
- All Implemented Interfaces:
Serializable,Mutable
A mutable
Object wrapper.- Since:
- 2.1
- Version:
- $Id: MutableObject.java 905636 2010-02-02 14:03:32Z niallp $
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new MutableObject with the default value ofnull.MutableObject(Object value) Constructs a new MutableObject with the specified value. -
Method Summary
-
Constructor Details
-
MutableObject
public MutableObject()Constructs a new MutableObject with the default value ofnull. -
MutableObject
Constructs a new MutableObject with the specified value.- Parameters:
value- the initial value to store
-
-
Method Details
-
getValue
Gets the value. -
setValue
Sets the value. -
equals
Compares this object against the specified object. The result istrueif and only if the argument is notnulland is aMutableObjectobject that contains the sameObjectvalue as this object. -
hashCode
public int hashCode()Returns the value's hash code or0if the value isnull. -
toString
Returns the String value of this mutable.
-