Package org.apache.commons.lang.mutable
Class MutableObject
- java.lang.Object
-
- org.apache.commons.lang.mutable.MutableObject
-
- All Implemented Interfaces:
java.io.Serializable
,Mutable
@Deprecated(since="2021-04-30") public class MutableObject extends java.lang.Object implements Mutable, java.io.Serializable
Deprecated.Commons Lang 2 is in maintenance mode. Commons Lang 3 should be used instead.A mutableObject
wrapper.- Since:
- 2.1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MutableObject()
Deprecated.Constructs a new MutableObject with the default value ofnull
.MutableObject(java.lang.Object value)
Deprecated.Constructs a new MutableObject with the specified value.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Deprecated.Compares this object against the specified object.java.lang.Object
getValue()
Deprecated.Gets the value.int
hashCode()
Deprecated.Returns the value's hash code or0
if the value isnull
.void
setValue(java.lang.Object value)
Deprecated.Sets the value.java.lang.String
toString()
Deprecated.Returns the String value of this mutable.
-
-
-
Constructor Detail
-
MutableObject
public MutableObject()
Deprecated.Constructs a new MutableObject with the default value ofnull
.
-
MutableObject
public MutableObject(java.lang.Object value)
Deprecated.Constructs a new MutableObject with the specified value.- Parameters:
value
- the initial value to store
-
-
Method Detail
-
getValue
public java.lang.Object getValue()
Deprecated.Gets the value.
-
setValue
public void setValue(java.lang.Object value)
Deprecated.Sets the value.
-
equals
public boolean equals(java.lang.Object obj)
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.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- the object to compare with, null returns false- Returns:
true
if the objects are the same;false
otherwise.
-
hashCode
public int hashCode()
Deprecated.Returns the value's hash code or0
if the value isnull
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- the value's hash code or
0
if the value isnull
.
-
toString
public java.lang.String toString()
Deprecated.Returns the String value of this mutable.- Overrides:
toString
in classjava.lang.Object
- Returns:
- the mutable value as a string
-
-