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

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.ORBooleanState
All Implemented Interfaces:
BooleanState, Disposable, State

public class ORBooleanState
extends AbstractCombinedBooleanState

A BooleanState that combines a set of other boolean states with the logical OR 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
ORBooleanState(java.lang.String name)
          Creates a new ORBooleanState.
ORBooleanState(java.lang.String name, BooleanState[] states, boolean[] signs)
          Creates a new ORBooleanState.
 
Method Summary
static ORBooleanState create(java.lang.String name, BooleanState state1)
          Creates a new ORBooleanState.
static ORBooleanState create(java.lang.String name, BooleanState state1, boolean sign1)
          Creates a new ORBooleanState.
static ORBooleanState create(java.lang.String name, BooleanState state1, boolean sign1, BooleanState state2, boolean sign2)
          Creates a new ORBooleanState.
static ORBooleanState create(java.lang.String name, BooleanState state1, boolean sign1, BooleanState state2, boolean sign2, BooleanState state3, boolean sign3)
          Creates a new ORBooleanState.
static ORBooleanState create(java.lang.String name, BooleanState state1, boolean sign1, BooleanState state2, boolean sign2, BooleanState state3, boolean sign3, BooleanState state4, boolean sign4)
          Creates a new ORBooleanState.
static ORBooleanState 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 ORBooleanState.
static ORBooleanState 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 ORBooleanState.
static ORBooleanState create(java.lang.String name, BooleanState state1, BooleanState state2)
          Creates a new ORBooleanState.
static ORBooleanState create(java.lang.String name, BooleanState state1, BooleanState state2, BooleanState state3)
          Creates a new ORBooleanState.
static ORBooleanState create(java.lang.String name, BooleanState state1, BooleanState state2, BooleanState state3, BooleanState state4)
          Creates a new ORBooleanState.
static ORBooleanState create(java.lang.String name, BooleanState state1, BooleanState state2, BooleanState state3, BooleanState state4, BooleanState state5)
          Creates a new ORBooleanState.
static ORBooleanState create(java.lang.String name, BooleanState state1, BooleanState state2, BooleanState state3, BooleanState state4, BooleanState state5, BooleanState state6)
          Creates a new ORBooleanState.
 
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

ORBooleanState

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

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

ORBooleanState

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

Parameters:
name - the name of this ORBooleanState (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 ORBooleanState create(java.lang.String name,
                                    BooleanState state1,
                                    boolean sign1)
Creates a new ORBooleanState.

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

create

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

Parameters:
name - the name of this ORBooleanState (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 ORBooleanState

create

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

Parameters:
name - the name of this ORBooleanState (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 ORBooleanState

create

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

Parameters:
name - the name of this ORBooleanState (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 ORBooleanState

create

public static ORBooleanState 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 ORBooleanState.

Parameters:
name - the name of this ORBooleanState (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 ORBooleanState

create

public static ORBooleanState 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 ORBooleanState.

Parameters:
name - the name of this ORBooleanState (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 ORBooleanState

create

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

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

create

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

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

create

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

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

create

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

Parameters:
name - the name of this ORBooleanState (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 ORBooleanState

create

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

Parameters:
name - the name of this ORBooleanState (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 ORBooleanState

create

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

Parameters:
name - the name of this ORBooleanState (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 ORBooleanState