|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.lang.mutable.MutableObject
A mutable Object
wrapper.
Constructor Summary | |
MutableObject()
Constructs a new MutableObject with the default value of null . |
|
MutableObject(java.lang.Object value)
Constructs a new MutableObject with the specified value. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Compares this object against the specified object. |
java.lang.Object |
getValue()
Gets the value. |
int |
hashCode()
Returns the value's hash code or 0 if the value is null . |
void |
setValue(java.lang.Object value)
Sets the value. |
java.lang.String |
toString()
Returns the String value of this mutable. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MutableObject()
null
.
public MutableObject(java.lang.Object value)
value
- a value.Method Detail |
public java.lang.Object getValue()
getValue
in interface Mutable
public void setValue(java.lang.Object value)
setValue
in interface Mutable
value
- the value to setpublic boolean equals(java.lang.Object obj)
true
if and only if the argument
is not null
and is a MutableObject
object that contains the same Object
value as this object.
obj
- the object to compare with.
true
if the objects are the same; false
otherwise.public int hashCode()
0
if the value is null
.
0
if the value is null
.public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |