|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.lang.mutable.MutableBoolean
public class MutableBoolean
A mutable boolean wrapper.
Boolean,
Serialized Form| Constructor Summary | |
|---|---|
MutableBoolean()
Constructs a new MutableBoolean with the default value of false. |
|
MutableBoolean(boolean value)
Constructs a new MutableBoolean with the specified value. |
|
MutableBoolean(java.lang.Boolean value)
Constructs a new MutableBoolean with the specified value. |
|
| Method Summary | |
|---|---|
boolean |
booleanValue()
Returns the value of this MutableBoolean as a boolean. |
int |
compareTo(java.lang.Object obj)
Compares this mutable to another in ascending order. |
boolean |
equals(java.lang.Object obj)
Compares this object to the specified object. |
java.lang.Object |
getValue()
Gets the value as a Boolean instance. |
int |
hashCode()
Returns a suitable hashcode for this mutable. |
void |
setValue(boolean value)
Sets the value. |
void |
setValue(java.lang.Object value)
Sets the value from any Boolean instance. |
java.lang.String |
toString()
Returns the String value of this mutable. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MutableBoolean()
public MutableBoolean(boolean value)
value - a value.public MutableBoolean(java.lang.Boolean value)
value - a value.
java.lang.NullPointerException - if the object is null| Method Detail |
|---|
public boolean booleanValue()
public int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparableobj - the mutable to compare to
java.lang.ClassCastException - if the argument is not a MutableIntpublic boolean equals(java.lang.Object obj)
true if and only if the argument is
not null and is an MutableBoolean object that contains the same
boolean value as this object.
equals in class java.lang.Objectobj - the object to compare with.
true if the objects are the same; false otherwise.public java.lang.Object getValue()
getValue in interface Mutablepublic int hashCode()
hashCode in class java.lang.Object1231 if this object represents true; returns the integer
1237 if this object represents false.public void setValue(boolean value)
value - the value to setpublic void setValue(java.lang.Object value)
setValue in interface Mutablevalue - the value to set
java.lang.NullPointerException - if the object is null
java.lang.ClassCastException - if the type is not a Booleanpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||