MutableObject
- public class org.apache.commons.lang3.mutable.MutableObject<T> implements Mutable<T>, Serializable[source]
A mutable
Objectwrapper.This class was created before the introduction of the
java.util.concurrent.atomicpackage and theAtomicReferenceclass.- Parameters:
<T> – The type to set and get.
- See also:
- Since:
2.1
Constructors
Constructs a new MutableObject with the default value of |
|
Constructs a new MutableObject with the specified value. |
Methods
Compares this object against the specified object. |
|
Deprecated. Gets the value. |
|
Returns the value’s hash code or |
|
Sets the value. |
|
Returns the String value of this mutable. |
- @Override public boolean equals(Object obj)[source]
Compares this object against the specified object. The result is
trueif and only if the argument is notnulland is aMutableObjectobject that contains the sameTvalue as this object.- Parameters:
obj – The object to compare with,
nullreturnsfalse.- Returns:
trueif the objects are the same;trueif the objects have equivalentvaluefields;falseotherwise.
- @Deprecated @Override public T getValue()[source]
Deprecated: Use
#get().Gets the value.
- Returns:
The value, may be null.
- @Override public int hashCode()[source]
Returns the value’s hash code or
0if the value isnull.- Returns:
The value’s hash code or
0if the value isnull.