Package jmri.jmrit.symbolicprog
Class ArithmeticQualifier
java.lang.Object
jmri.jmrit.symbolicprog.AbstractQualifier
jmri.jmrit.symbolicprog.ArithmeticQualifier
- All Implemented Interfaces:
PropertyChangeListener,EventListener,Qualifier
- Direct Known Subclasses:
JComponentQualifier,PaneQualifier,ValueQualifier
Mechanism to qualify on the value of a number.
The usual arithmetic operations are possible: ge, le, gt, lt, eq, ne. The sense of this is comparing "current value" to "constant", for example "current value gt 3".
You can also check whether the value "exists" (value of 1) or not (value of 0). Comparisons with the value of a non-existent variable always fail.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) ArithmeticQualifier.Test(package private) long(package private) booleanFields inherited from class jmri.jmrit.symbolicprog.AbstractQualifier
watchedVal -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanCalculate whether a particular value for the qualifier Variable means that the qualified Object should be set Available or not.booleanDoes the current value of qualifier Variable means that the qualified object should be set Available or not?voidupdate()Process the current value and do whatever is needed.Methods inherited from class jmri.jmrit.symbolicprog.AbstractQualifier
availableStateFromEvent, currentAvailableState, getWatchedVariable, processValueChangeEvent, propertyChange, setWatchedAvailable
-
Field Details
-
test
-
value
long value -
warnedDoesntExist
boolean warnedDoesntExist
-
-
Constructor Details
-
ArithmeticQualifier
-
-
Method Details
-
currentDesiredState
Description copied from class:AbstractQualifierDoes the current value of qualifier Variable means that the qualified object should be set Available or not?- Specified by:
currentDesiredStatein interfaceQualifier- Specified by:
currentDesiredStatein classAbstractQualifier- Returns:
- true if should be set available
-
availableStateFromValue
Description copied from class:AbstractQualifierCalculate whether a particular value for the qualifier Variable means that the qualified Object should be set Available or not.- Specified by:
availableStateFromValuein classAbstractQualifier- Parameters:
now- base for the calculation- Returns:
- true if should be set available
-
update
Description copied from interface:QualifierProcess the current value and do whatever is needed.
-