Package jmri
Class CommonTurnoutOperation
java.lang.Object
jmri.beans.PropertyChangeSupport
jmri.TurnoutOperation
jmri.CommonTurnoutOperation
- All Implemented Interfaces:
Comparable<Object>,PropertyChangeFirer,PropertyChangeProvider
- Direct Known Subclasses:
NoFeedbackTurnoutOperation,RawTurnoutOperation,SensorTurnoutOperation
Specialization of TurnoutOperation to contain
common properties and methods for concrete subclasses.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) intstatic final intstatic final intstatic final int(package private) intstatic final intstatic final intFields inherited from class jmri.TurnoutOperation
feedbackModes, name, nonceFields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupport -
Constructor Summary
ConstructorsConstructorDescriptionCommonTurnoutOperation(String name, int interval, int maxTries) Create common properties for Turnout Operation. -
Method Summary
Modifier and TypeMethodDescriptionbooleanequivalentTo(TurnoutOperation other) abstract intabstract intintintabstract TurnoutOperatorGet a TurnoutOperator instance for this operation.voidsetInterval(int newInterval) Set new value for interval.voidsetMaxTries(int newMaxTries) Set new value for MaxTries.Methods inherited from class jmri.TurnoutOperation
compareTo, dispose, equals, getDefinitive, getName, getToolTip, hashCode, isDefinitive, isDeleted, isInUse, isNonce, makeCopy, makeNonce, matchFeedbackMode, rename, setFeedbackModes, setNonceMethods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
Constructor Details
-
CommonTurnoutOperation
Create common properties for Turnout Operation.- Parameters:
name- Operator Name.interval- Interval between retries.maxTries- maximum retry attempts.
-
-
Method Details
-
getOperator
Get a TurnoutOperator instance for this operation.- Specified by:
getOperatorin classTurnoutOperation- Parameters:
t- the turnout to apply the operation to- Returns:
- the operator
-
getInterval
-
getMaxTries
-
getDefaultInterval
-
getDefaultMaxTries
-
equivalentTo
- Specified by:
equivalentToin classTurnoutOperation- Parameters:
other- another TurnoutOperation- Returns:
- true if the two operations are equivalent, i.e. same subclass and same parameters
-
setInterval
Set new value for interval. Do nothing if not in range.- Parameters:
newInterval- new retry interval time
-
setMaxTries
Set new value for MaxTries. Do nothing if not in range.- Parameters:
newMaxTries- new maximum number of retries
-