|
TPTP 4.5.0 Platform Project Public API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.hyades.automation.core.utils.MutableBoolean
public class MutableBoolean
A mutable boolean is mainly used for the accumulation of state from local or anonymously defined inner classes into the surrounding context (to be accessed variables of this type must be defined final at point-of-use). A java.lang.Boolean is immutable once declared final and therefore cannot be used for this purpose. This is almost equivalent to a pointer to an Boolean rather than just the Boolean itself.
| Constructor Summary | |
|---|---|
MutableBoolean()
Constructs a mutable Boolean |
|
MutableBoolean(boolean value)
Constructs a mutable Boolean with the given value. |
|
MutableBoolean(java.lang.Boolean value)
Constructs a mutable Boolean with the given value |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object object)
|
int |
hashCode()
|
boolean |
isFalse()
The opposite of the is true method |
boolean |
isTrue()
Indicates is the boolean value is true |
void |
setAsFalse()
Sets the contained boolean value to false if not already false |
void |
setAsTrue()
Sets the contained boolean value to true if not already true |
void |
setValue(boolean value)
Set the contained boolean value to the value specified if not already, factory method for the contained boolean type used -- also included the redundancy check to avoid setting to the same value and creating another Boolean object unneedingly |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MutableBoolean()
public MutableBoolean(boolean value)
value - the value the internally stored state of the mutable Boolean
will be initialized topublic MutableBoolean(java.lang.Boolean value)
value - the value the internally stored state of the mutable Boolean
will be initialized to| Method Detail |
|---|
public boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean isFalse()
public boolean isTrue()
public void setAsFalse()
public void setAsTrue()
public void setValue(boolean value)
value - the state to change to if not already in that state
|
TPTP 4.5.0 Platform Project Public API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||