com.sdm.quasar.client.core.states
Class ANDBooleanState

java.lang.Object
  extended bycom.sdm.quasar.client.core.states.AbstractState
      extended bycom.sdm.quasar.client.core.states.AbstractBooleanState
          extended bycom.sdm.quasar.client.core.states.AbstractCombinedBooleanState
              extended bycom.sdm.quasar.client.core.states.ANDBooleanState
All Implemented Interfaces:
BooleanState, Disposable, State

public class ANDBooleanState
extends AbstractCombinedBooleanState

A BooleanState that combines a set of other boolean states with the logical AND operation.

Version:
1.0
Author:
Thomas Wolf

Field Summary
 
Fields inherited from class com.sdm.quasar.client.core.states.AbstractCombinedBooleanState
OPERATION_AND, OPERATION_OR, OPERATION_XOR
 
Constructor Summary
ANDBooleanState(java.lang.String name)
          Creates a new ANDBooleanState.
ANDBooleanState(java.lang.String name, BooleanState[] states, boolean[] signs)
          Creates a new ANDBooleanState.
 
Method Summary
static ANDBooleanState create(java.lang.String name, BooleanState state1)
          Creates a new ANDBooleanState.
static ANDBooleanState create(java.lang.String name, BooleanState state1, boolean sign1)
          Creates a new ANDBooleanState.
static ANDBooleanState create(java.lang.String name, BooleanState state1, boolean sign1, BooleanState state2, boolean sign2)
          Creates a new ANDBooleanState.
static ANDBooleanState create(java.lang.String name, BooleanState state1, boolean sign1, BooleanState state2, boolean sign2, BooleanState state3, boolean sign3)
          Creates a new ANDBooleanState.
static ANDBooleanState create(java.lang.String name, BooleanState state1, boolean sign1, BooleanState state2, boolean sign2, BooleanState state3, boolean sign3, BooleanState state4, boolean sign4)
          Creates a new ANDBooleanState.
static ANDBooleanState create(java.lang.String name, BooleanState state1, boolean sign1, BooleanState state2, boolean sign2, BooleanState state3, boolean sign3, BooleanState state4, boolean sign4, BooleanState state5, boolean sign5)
          Creates a new ANDBooleanState.
static ANDBooleanState create(java.lang.String name, BooleanState state1, boolean sign1, BooleanState state2, boolean sign2, BooleanState state3, boolean sign3, BooleanState state4, boolean sign4, BooleanState state5, boolean sign5, BooleanState state6, boolean sign6)
          Creates a new ANDBooleanState.
static ANDBooleanState create(java.lang.String name, BooleanState state1, BooleanState state2)
          Creates a new ANDBooleanState.
static ANDBooleanState create(java.lang.String name, BooleanState state1, BooleanState state2, BooleanState state3)
          Creates a new ANDBooleanState.
static ANDBooleanState create(java.lang.String name, BooleanState state1, BooleanState state2, BooleanState state3, BooleanState state4)
          Creates a new ANDBooleanState.
static ANDBooleanState create(java.lang.String name, BooleanState state1, BooleanState state2, BooleanState state3, BooleanState state4, BooleanState state5)
          Creates a new ANDBooleanState.
static ANDBooleanState create(java.lang.String name, BooleanState state1, BooleanState state2, BooleanState state3, BooleanState state4, BooleanState state5, BooleanState state6)
          Creates a new ANDBooleanState.
 
Methods inherited from class com.sdm.quasar.client.core.states.AbstractCombinedBooleanState
add, dispose, get, getCount, getOperation, getSign, remove, remove, 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
 

Constructor Detail

ANDBooleanState

public ANDBooleanState(java.lang.String name)
Creates a new ANDBooleanState.

Parameters:
name - the name of this ANDBooleanState (not null)

ANDBooleanState

public ANDBooleanState(java.lang.String name,
                       BooleanState[] states,
                       boolean[] signs)
Creates a new ANDBooleanState.

Parameters:
name - the name of this ANDBooleanState (not null)
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

create

public static ANDBooleanState create(java.lang.String name,
                                     BooleanState state1,
                                     boolean sign1)
Creates a new ANDBooleanState.

Parameters:
name - the name of this ANDBooleanState (not null)
state1 - the first BooleanState to add
sign1 - the sign of the first BooleanState (true for positive, false for negated)
Returns:
the created ANDBooleanState

create

public static ANDBooleanState create(java.lang.String name,
                                     BooleanState state1,
                                     boolean sign1,
                                     BooleanState state2,
                                     boolean sign2)
Creates a new ANDBooleanState.

Parameters:
name - the name of this ANDBooleanState (not null)
state1 - the first BooleanState to add
sign1 - the sign of the first BooleanState (true for positive, false for negated)
state2 - the second BooleanState to add
sign2 - the sign of the second BooleanState (true for positive, false for negated)
Returns:
the created ANDBooleanState

create

public static ANDBooleanState create(java.lang.String name,
                                     BooleanState state1,
                                     boolean sign1,
                                     BooleanState state2,
                                     boolean sign2,
                                     BooleanState state3,
                                     boolean sign3)
Creates a new ANDBooleanState.

Parameters:
name - the name of this ANDBooleanState (not null)
state1 - the first BooleanState to add
sign1 - the sign of the first BooleanState (true for positive, false for negated)
state2 - the second BooleanState to add
sign2 - the sign of the second BooleanState (true for positive, false for negated)
state3 - the third BooleanState to add
sign3 - the sign of the third BooleanState (true for positive, false for negated)
Returns:
the created ANDBooleanState

create

public static ANDBooleanState create(java.lang.String name,
                                     BooleanState state1,
                                     boolean sign1,
                                     BooleanState state2,
                                     boolean sign2,
                                     BooleanState state3,
                                     boolean sign3,
                                     BooleanState state4,
                                     boolean sign4)
Creates a new ANDBooleanState.

Parameters:
name - the name of this ANDBooleanState (not null)
state1 - the first BooleanState to add
sign1 - the sign of the first BooleanState (true for positive, false for negated)
state2 - the second BooleanState to add
sign2 - the sign of the second BooleanState (true for positive, false for negated)
state3 - the third BooleanState to add
sign3 - the sign of the third BooleanState (true for positive, false for negated)
state4 - the fourth BooleanState to add
sign4 - the sign of the fourth BooleanState (true for positive, false for negated)
Returns:
the created ANDBooleanState

create

public static ANDBooleanState create(java.lang.String name,
                                     BooleanState state1,
                                     boolean sign1,
                                     BooleanState state2,
                                     boolean sign2,
                                     BooleanState state3,
                                     boolean sign3,
                                     BooleanState state4,
                                     boolean sign4,
                                     BooleanState state5,
                                     boolean sign5)
Creates a new ANDBooleanState.

Parameters:
name - the name of this ANDBooleanState (not null)
state1 - the first BooleanState to add
sign1 - the sign of the first BooleanState (true for positive, false for negated)
state2 - the second BooleanState to add
sign2 - the sign of the second BooleanState (true for positive, false for negated)
state3 - the third BooleanState to add
sign3 - the sign of the third BooleanState (true for positive, false for negated)
state4 - the fourth BooleanState to add
sign4 - the sign of the fourth BooleanState (true for positive, false for negated)
state5 - the fifth BooleanState to add
sign5 - the sign of the fifth BooleanState (true for positive, false for negated)
Returns:
the created ANDBooleanState

create

public static ANDBooleanState create(java.lang.String name,
                                     BooleanState state1,
                                     boolean sign1,
                                     BooleanState state2,
                                     boolean sign2,
                                     BooleanState state3,
                                     boolean sign3,
                                     BooleanState state4,
                                     boolean sign4,
                                     BooleanState state5,
                                     boolean sign5,
                                     BooleanState state6,
                                     boolean sign6)
Creates a new ANDBooleanState.

Parameters:
name - the name of this ANDBooleanState (not null)
state1 - the first BooleanState to add
sign1 - the sign of the first BooleanState (true for positive, false for negated)
state2 - the second BooleanState to add
sign2 - the sign of the second BooleanState (true for positive, false for negated)
state3 - the third BooleanState to add
sign3 - the sign of the third BooleanState (true for positive, false for negated)
state4 - the fourth BooleanState to add
sign4 - the sign of the fourth BooleanState (true for positive, false for negated)
state5 - the fifth BooleanState to add
sign5 - the sign of the fifth BooleanState (true for positive, false for negated)
state6 - the sixth BooleanState to add
sign6 - the sign of the sixth BooleanState (true for positive, false for negated)
Returns:
the created ANDBooleanState

create

public static ANDBooleanState create(java.lang.String name,
                                     BooleanState state1)
Creates a new ANDBooleanState.

Parameters:
name - the name of this ANDBooleanState (not null)
state1 - the first BooleanState to add
Returns:
the created ANDBooleanState

create

public static ANDBooleanState create(java.lang.String name,
                                     BooleanState state1,
                                     BooleanState state2)
Creates a new ANDBooleanState.

Parameters:
name - the name of this ANDBooleanState (not null)
state1 - the first BooleanState to add
state2 - the second BooleanState to add
Returns:
the created ANDBooleanState

create

public static ANDBooleanState create(java.lang.String name,
                                     BooleanState state1,
                                     BooleanState state2,
                                     BooleanState state3)
Creates a new ANDBooleanState.

Parameters:
name - the name of this ANDBooleanState (not null)
state1 - the first BooleanState to add
state2 - the second BooleanState to add
state3 - the third BooleanState to add
Returns:
the created ANDBooleanState

create

public static ANDBooleanState create(java.lang.String name,
                                     BooleanState state1,
                                     BooleanState state2,
                                     BooleanState state3,
                                     BooleanState state4)
Creates a new ANDBooleanState.

Parameters:
name - the name of this ANDBooleanState (not null)
state1 - the first BooleanState to add
state2 - the second BooleanState to add
state3 - the third BooleanState to add
state4 - the fourth BooleanState to add
Returns:
the created ANDBooleanState

create

public static ANDBooleanState create(java.lang.String name,
                                     BooleanState state1,
                                     BooleanState state2,
                                     BooleanState state3,
                                     BooleanState state4,
                                     BooleanState state5)
Creates a new ANDBooleanState.

Parameters:
name - the name of this ANDBooleanState (not null)
state1 - the first BooleanState to add
state2 - the second BooleanState to add
state3 - the third BooleanState to add
state4 - the fourth BooleanState to add
state5 - the fifth BooleanState to add
Returns:
the created ANDBooleanState

create

public static ANDBooleanState create(java.lang.String name,
                                     BooleanState state1,
                                     BooleanState state2,
                                     BooleanState state3,
                                     BooleanState state4,
                                     BooleanState state5,
                                     BooleanState state6)
Creates a new ANDBooleanState.

Parameters:
name - the name of this ANDBooleanState (not null)
state1 - the first BooleanState to add
state2 - the second BooleanState to add
state3 - the third BooleanState to add
state4 - the fourth BooleanState to add
state5 - the fifth BooleanState to add
state6 - the sixth BooleanState to add
Returns:
the created ANDBooleanState