cz.cuni.amis.utils.flag.connective
Class Connective

java.lang.Object
  extended by cz.cuni.amis.utils.flag.Flag<java.lang.Boolean>
      extended by cz.cuni.amis.utils.flag.connective.Connective
All Implemented Interfaces:
IFlag<java.lang.Boolean>, java.io.Serializable
Direct Known Subclasses:
And, Or

public abstract class Connective
extends Flag<java.lang.Boolean>

Used to create logical expression out of different flags. (Warning: spagetthi code ahead!)

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class cz.cuni.amis.utils.flag.Flag
Flag.DoInSync<T>
 
Field Summary
protected  java.util.Set<Flag<java.lang.Boolean>> flags
           
protected  java.util.List<ConnectiveListener> listeners
           
protected  int[] truthValue
           
 
Constructor Summary
Connective(Flag<java.lang.Boolean>[] flags)
           
Connective(Flag<java.lang.Boolean> flag1, Flag<java.lang.Boolean> flag2)
           
 
Method Summary
 int hashCode()
           
protected abstract  void truthValueChanged()
           
 
Methods inherited from class cz.cuni.amis.utils.flag.Flag
addListener, addStrongListener, clearListeners, defreeze, freeze, getFlag, getImmutable, inSync, inSyncInner, isFrozen, isListenning, isNone, isOne, removeAllListeners, removeListener, setFlag, waitFor, waitFor, waitForChange, waitForChange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

protected java.util.List<ConnectiveListener> listeners

truthValue

protected int[] truthValue

flags

protected java.util.Set<Flag<java.lang.Boolean>> flags
Constructor Detail

Connective

public Connective(Flag<java.lang.Boolean> flag1,
                  Flag<java.lang.Boolean> flag2)

Connective

public Connective(Flag<java.lang.Boolean>[] flags)
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

truthValueChanged

protected abstract void truthValueChanged()