|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.lang3.mutable.MutableObject<T>
public class MutableObject<T>
A mutable Object wrapper.
| Constructor Summary | |
|---|---|
MutableObject()
Constructs a new MutableObject with the default value of null. |
|
MutableObject(T value)
Constructs a new MutableObject with the specified value. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Compares this object against the specified object. |
T |
getValue()
Gets the value. |
int |
hashCode()
Returns the value's hash code or 0 if the value is null. |
void |
setValue(T value)
Sets the value. |
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(T value)
value - the initial value to store| Method Detail |
|---|
public T getValue()
getValue in interface Mutable<T>public void setValue(T value)
setValue in interface Mutable<T>value - the value to setpublic boolean equals(Object obj)
Compares this object against the specified object. The result is true if and only if the argument
is not null and is a MutableObject object that contains the same T
value as this object.
equals in class Objectobj - the object to compare with, null returns false
true if the objects are the same;
true if the objects have equivalent value fields;
false otherwise.public int hashCode()
0 if the value is null.
hashCode in class Object0 if the value is null.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||