Package org.apache.commons.lang.mutable
Class MutableObject
java.lang.Object
org.apache.commons.lang.mutable.MutableObject
- All Implemented Interfaces:
Serializable
,Mutable
@Deprecated(since="2021-04-30")
public class MutableObject
extends Object
implements Mutable, Serializable
Deprecated.
Commons Lang 2 is in maintenance mode. Commons Lang 3 should be used instead.
A mutable
Object
wrapper.- Since:
- 2.1
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Constructs a new MutableObject with the default value ofnull
.MutableObject
(Object value) Deprecated.Constructs a new MutableObject with the specified value. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated.Compares this object against the specified object.getValue()
Deprecated.Gets the value.int
hashCode()
Deprecated.Returns the value's hash code or0
if the value isnull
.void
Deprecated.Sets the value.toString()
Deprecated.Returns the String value of this mutable.
-
Constructor Details
-
MutableObject
public MutableObject()Deprecated.Constructs a new MutableObject with the default value ofnull
. -
MutableObject
Deprecated.Constructs a new MutableObject with the specified value.- Parameters:
value
- the initial value to store
-
-
Method Details
-
getValue
Deprecated.Gets the value. -
setValue
Deprecated.Sets the value. -
equals
Deprecated.Compares this object against the specified object. The result istrue
if and only if the argument is notnull
and is aMutableObject
object that contains the sameObject
value as this object. -
hashCode
public int hashCode()Deprecated.Returns the value's hash code or0
if the value isnull
. -
toString
Deprecated.Returns the String value of this mutable.
-