org.apache.commons.lang.mutable
public class MutableBoolean extends Object implements Mutable, Serializable, Comparable
boolean wrapper.
Since: 2.2
Version: $Id: MutableBoolean.java 491052 2006-12-29 17:16:37Z scolebourne $
See Also: Boolean
| 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(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(Object obj)
Compares this mutable to another in ascending order.
|
| boolean | equals(Object obj)
Compares this object to the specified object. |
| 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(Object value)
Sets the value from any Boolean instance.
|
| String | toString()
Returns the String value of this mutable.
|
Parameters: value a value.
Parameters: value a value.
Throws: NullPointerException if the object is null
Returns: the boolean value represented by this object.
Parameters: obj the mutable to compare to
Returns: zero if this object represents the same boolean value as the argument; a positive value if this object represents true and the argument represents false; and a negative value if this object represents false and the argument represents true
Throws: ClassCastException if the argument is not a MutableInt
true if and only if the argument is
not null and is an MutableBoolean object that contains the same
boolean value as this object.
Parameters: obj the object to compare with.
Returns: true if the objects are the same; false otherwise.
Returns: the value as a Boolean
Returns: the integer 1231 if this object represents true; returns the integer
1237 if this object represents false.
Parameters: value the value to set
Parameters: value the value to set
Throws: NullPointerException if the object is null ClassCastException if the type is not a Boolean
Returns: the mutable value as a string