public class MutableObject extends java.lang.Object implements Mutable, java.io.Serializable
Object
wrapper.Constructor and Description |
---|
MutableObject()
Constructs a new MutableObject with the default value of
null . |
MutableObject(java.lang.Object value)
Constructs a new MutableObject with the specified value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Compares this object against the specified object.
|
java.lang.Object |
getValue()
Gets the value.
|
int |
hashCode()
Returns the value's hash code or
0 if the value is null . |
void |
setValue(java.lang.Object value)
Sets the value.
|
java.lang.String |
toString()
Returns the String value of this mutable.
|
public MutableObject()
null
.public MutableObject(java.lang.Object value)
value
- the initial value to storepublic java.lang.Object getValue()
public void setValue(java.lang.Object value)
public boolean equals(java.lang.Object obj)
true
if and only if the argument
is not null
and is a MutableObject
object that contains the same Object
value as this object.equals
in class java.lang.Object
obj
- the object to compare with, null returns falsetrue
if the objects are the same; false
otherwise.public int hashCode()
0
if the value is null
.hashCode
in class java.lang.Object
0
if the value is null
.public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2010 - 2020 Adobe. All Rights Reserved