Object wrapper.
This class was created before the introduction of the the java. package and the AtomicReference class.
AtomicReference
| Modifier and Type | Field and Description |
|---|---|
| private static final long | serialVersionUID
Required for serialization support. |
| private T | value
The mutable value. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | MutableObject(final T
the initial value to store. value)Constructs a new MutableObject with the specified value. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the objects are the same;
true if the objects have equivalent value fields;
false otherwise.the object to compare with, obj)null returns false.Overrides java. Compares this object against the specified object. |
| public T | Returns: the value, may be null.Implements org.
Deprecated
Use
get().
Gets the value. |
| public int | Returns: the value's hash code or0 if the value is null.Overrides java. Returns the value's hash code or |
| public void | setValue(final T
the value to set. value)Implements org. Sets the value. |
| public String | Returns: the mutable value as a string.Overrides java. Returns the String value of this mutable. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Required for serialization support.
| |
| value | back to summary |
|---|---|
| private T value The mutable value. | |
| MutableObject | back to summary |
|---|---|
| public MutableObject() Constructs a new MutableObject with the default value of | |
| MutableObject | back to summary |
|---|---|
| public MutableObject(final T value) Constructs a new MutableObject with the specified value.
| |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Overrides java. Compares this object against the specified object. The result is | |
| getValue | back to summary |
|---|---|
| public T getValue() Implements org. Deprecated Use Gets the value.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns the value's hash code or
| |
| setValue | back to summary |
|---|---|
| public void setValue(final T value) Implements org. Sets the value.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns the String value of this mutable. | |