|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sdm.quasar.client.core.states.AbstractState
com.sdm.quasar.client.core.states.AbstractBooleanState
com.sdm.quasar.client.core.states.AbstractCombinedBooleanState
Abstract base class for boolean states that perform boolean operations on a set of other boolean states.
| Field Summary | |
protected static byte |
OPERATION_AND
Operation-constant: The BooleanState values will
be combined in an conjunctive way (AND-operation). |
protected static byte |
OPERATION_OR
Operation-constant: The Operation values will
be combined in an disjunctive way (OR-operation). |
protected static byte |
OPERATION_XOR
Operation-constant: The Operation values will
be combined with the XOR-operation. |
| Constructor Summary | |
AbstractCombinedBooleanState(java.lang.String name,
byte operation)
Creates a new AbstractCombinedBooleanState. |
|
AbstractCombinedBooleanState(java.lang.String name,
byte operation,
BooleanState[] states,
boolean[] signs)
Creates a new AbstractCombinedBooleanState. |
|
| Method Summary | |
void |
add(BooleanState booleanState,
boolean sign)
Adds the given BooleanState to this AbstractCombinedBooleanState.
|
void |
dispose()
Disposes the component. |
BooleanState |
get(int index)
Returns the BooleanState combining with the given index. |
int |
getCount()
Returns the number of States combining. |
byte |
getOperation()
Returns the operation identifier of this AbstractCombinedBooleanState
(one of OPERATION_OR, OPERATION_AND or OPERATION_XOR). |
boolean |
getSign(int index)
Returns the sign of the BooleanState combining with the given index. |
void |
remove(BooleanState booleanState)
Removes the BooleanState from this AbstractCombinedBooleanState.
|
void |
remove(BooleanState booleanState,
boolean sign)
Removes the BooleanState from this AbstractCombinedBooleanState. |
java.lang.String |
toString()
|
| Methods inherited from class com.sdm.quasar.client.core.states.AbstractBooleanState |
getValue, isValueTrue, setValue, setValueWithoutNotification |
| Methods inherited from class com.sdm.quasar.client.core.states.AbstractState |
addStateListener, appendParametersToString, fireStateChanged, getName, removeStateListener, setName, stateValueToString, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.sdm.quasar.client.core.states.State |
addStateListener, getName, removeStateListener, setName |
| Field Detail |
protected static final byte OPERATION_AND
BooleanState values will
be combined in an conjunctive way (AND-operation).
protected static final byte OPERATION_OR
Operation values will
be combined in an disjunctive way (OR-operation).
protected static final byte OPERATION_XOR
Operation values will
be combined with the XOR-operation.
| Constructor Detail |
public AbstractCombinedBooleanState(java.lang.String name,
byte operation)
AbstractCombinedBooleanState.
name - the name of this AbstractCombinedBooleanState (not null)
public AbstractCombinedBooleanState(java.lang.String name,
byte operation,
BooleanState[] states,
boolean[] signs)
AbstractCombinedBooleanState.
name - the name of this AbstractCombinedBooleanState (not null)operation - the operation identifier of this AbstractCombinedBooleanState
(one of OPERATION_OR, OPERATION_AND or OPERATION_XOR)states - an array of States to watch
(if null, no states are watched).signs - an array of signs for the States
(if the array is null or the length does not match the one of the
states array, missing signs are threated as true, too many signs
are ignored)| Method Detail |
public void dispose()
throws DisposeException
Disposable
Important:
This method is called by an administrating component
and must never be called directly.
The implementation should release any resources or objects allocated and
any services registered. Furthermore, this method should be developed
carefully to free a maximum of resources even when the system may
have become unstable. In case of one or multiple errors, you should collect
them in a DisposeException, continue with the execution,
and throw it at the end of the method.
Note: The implementation must not return before the component is disposed. Any threads or asynchronous calls started must be completed before this method returns.
dispose in interface Disposabledispose in class AbstractStateDisposeExceptionAbstractState.dispose()public byte getOperation()
AbstractCombinedBooleanState
(one of OPERATION_OR, OPERATION_AND or OPERATION_XOR).
public int getCount()
States combining.
public BooleanState get(int index)
BooleanState combining with the given index.
index - the index of the state (must be valid; 0<=index<getCount())public boolean getSign(int index)
BooleanState combining with the given index.
index - the index of the state (must be valid; 0<=index<getCount())
public void add(BooleanState booleanState,
boolean sign)
BooleanState to this AbstractCombinedBooleanState.
Note: A state can be added maximum two times: positive and inverted (even if this makes no sence in most cases).
booleanState - the BooleanState to addsign - the sign to add (true for positive, false
for negation)public void remove(BooleanState booleanState)
BooleanState from this AbstractCombinedBooleanState.
Note: This method removes the positive and the negated occurence of the state (if there are two).
booleanState - the BooleanState to remove
public void remove(BooleanState booleanState,
boolean sign)
BooleanState from this AbstractCombinedBooleanState.
booleanState - the BooleanState to removesign - the sign to remove (true for the positive,
false for negated occurence)public java.lang.String toString()
toString in class AbstractState
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||