kiwi.util
Class BooleanHolder
java.lang.Object
|
+--kiwi.util.HolderObject
|
+--kiwi.util.BooleanHolder
- public class BooleanHolder
- extends HolderObject
A mutable holder for a boolean
value.
- Author:
- Mark Lindner, PING Software Group
Field Summary |
protected boolean |
value
The current value. |
Constructor Summary |
BooleanHolder()
Construct a new BooleanHolder with an initial value of
false and default subtype of 0. |
BooleanHolder(boolean value)
Construct a new BooleanHolder with a specified initial
value and default subtype of 0. |
BooleanHolder(boolean value,
int subtype)
Construct a new BooleanHolder with a specified initial
value and subtype. |
Method Summary |
int |
compareTo(HolderObject other)
Compare this holder object to another. |
boolean |
getValue()
Get the BooleanHolder 's value. |
void |
setValue(boolean value)
Set the BooleanHolder 's value. |
java.lang.String |
toString()
Get a string representation for this object. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
value
protected boolean value
- The current value.
BooleanHolder
public BooleanHolder()
- Construct a new
BooleanHolder
with an initial value of
false and default subtype of 0.
BooleanHolder
public BooleanHolder(boolean value)
- Construct a new
BooleanHolder
with a specified initial
value and default subtype of 0.
- Parameters:
value
- The initial value.
BooleanHolder
public BooleanHolder(boolean value,
int subtype)
- Construct a new
BooleanHolder
with a specified initial
value and subtype.
- Parameters:
value
- The initial value.subtype
- The subtype for this value.
setValue
public final void setValue(boolean value)
- Set the
BooleanHolder
's value.
- Parameters:
value
- The new value.
getValue
public final boolean getValue()
- Get the
BooleanHolder
's value.
- Returns:
- The current value.
toString
public java.lang.String toString()
- Get a string representation for this object.
- Overrides:
toString
in class java.lang.Object
compareTo
public int compareTo(HolderObject other)
- Compare this holder object to another.
- Overrides:
compareTo
in class HolderObject
- Following copied from class:
kiwi.util.HolderObject
- Parameters:
other
- The HolderObject
to compare against.- Returns:
- -1 if this object is "less than" the other object; 1 if this
object is "greater than" the other object, and 0 if the objects are
"equal."