Package jmri.jmrit.symbolicprog
Class QualifierCombiner
- java.lang.Object
-
- jmri.jmrit.symbolicprog.QualifierCombiner
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener,java.util.EventListener,Qualifier
public class QualifierCombiner extends java.lang.Object implements Qualifier, java.beans.PropertyChangeListener
Force a set of Qualifiers to work in an AND relationship.On transition, the qualifiers are evaluated in order, stopping when the outcome is known.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.List<Qualifier>qualifiers
-
Constructor Summary
Constructors Constructor Description QualifierCombiner(java.util.List<Qualifier> qualifiers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancurrentDesiredState()Check whether this Qualifier is currently in the OK, qualified-to-act state.voidpropertyChange(java.beans.PropertyChangeEvent e)voidsetWatchedAvailable(boolean enable)Drive the available or not state of the qualified object.voidupdate()Process the current value and do whatever is needed.
-
-
-
Field Detail
-
qualifiers
java.util.List<Qualifier> qualifiers
-
-
Constructor Detail
-
QualifierCombiner
public QualifierCombiner(java.util.List<Qualifier> qualifiers)
-
-
Method Detail
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChangein interfacejava.beans.PropertyChangeListener
-
setWatchedAvailable
public void setWatchedAvailable(boolean enable)
Description copied from interface:QualifierDrive the available or not state of the qualified object.Subclasses implement this to control a specific type of qualified object, like a Variable or Pane.
- Specified by:
setWatchedAvailablein interfaceQualifier- Parameters:
enable- true to drive, else false.
-
currentDesiredState
public boolean currentDesiredState()
Description copied from interface:QualifierCheck whether this Qualifier is currently in the OK, qualified-to-act state.- Specified by:
currentDesiredStatein interfaceQualifier- Returns:
- true if this Qualifier is currently saying OK
-
-