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 boolean
currentDesiredState()
Check whether this Qualifier is currently in the OK, qualified-to-act state.void
propertyChange(java.beans.PropertyChangeEvent e)
void
setWatchedAvailable(boolean enable)
Drive the available or not state of the qualified object.void
update()
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:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
setWatchedAvailable
public void setWatchedAvailable(boolean enable)
Description copied from interface:Qualifier
Drive 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:
setWatchedAvailable
in interfaceQualifier
- Parameters:
enable
- true to drive, else false.
-
currentDesiredState
public boolean currentDesiredState()
Description copied from interface:Qualifier
Check whether this Qualifier is currently in the OK, qualified-to-act state.- Specified by:
currentDesiredState
in interfaceQualifier
- Returns:
- true if this Qualifier is currently saying OK
-
-