Package jmri.jmrit.display.layoutEditor
Class LayoutTrackExpectedState<T extends LayoutTrack>
- java.lang.Object
-
- jmri.beans.UnboundBean
-
- jmri.beans.Bean
-
- jmri.jmrit.display.layoutEditor.LayoutTrackExpectedState<T>
-
- Type Parameters:
T
- the supported type of LayoutTrack
- All Implemented Interfaces:
BeanInterface
,PropertyChangeFirer
,PropertyChangeProvider
,ExpectedState<T,java.lang.Integer>
public class LayoutTrackExpectedState<T extends LayoutTrack> extends Bean implements ExpectedState<T,java.lang.Integer>
Retain a LayoutTrack and its expected state.
-
-
Field Summary
-
Fields inherited from class jmri.beans.Bean
propertyChangeSupport
-
Fields inherited from interface jmri.ExpectedState
EXPECTED_STATE
-
-
Constructor Summary
Constructors Constructor Description LayoutTrackExpectedState(T layoutTrack, java.lang.Integer state)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Integer
getExpectedState()
Get the expected state.T
getObject()
Get the Object this records the expected state for.void
setExpectedState(java.lang.Integer state)
Set the expected state.-
Methods inherited from class jmri.beans.Bean
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, isNotifyOnEDT, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class jmri.beans.UnboundBean
getIndexedProperty, getProperty, getPropertyNames, hasIndexedProperty, hasProperty, setIndexedProperty, setProperty
-
-
-
-
Constructor Detail
-
LayoutTrackExpectedState
public LayoutTrackExpectedState(T layoutTrack, java.lang.Integer state)
-
-
Method Detail
-
getExpectedState
public java.lang.Integer getExpectedState()
Description copied from interface:ExpectedState
Get the expected state. This state should not change as the state of the NamedBean changes.- Specified by:
getExpectedState
in interfaceExpectedState<T extends LayoutTrack,java.lang.Integer>
- Returns:
- the expected state
-
setExpectedState
public void setExpectedState(java.lang.Integer state) throws java.lang.UnsupportedOperationException
Description copied from interface:ExpectedState
Set the expected state.If UnsupportedOperationException is not thrown, this must fire a
PropertyChangeEvent
with the name "expectedState"- Specified by:
setExpectedState
in interfaceExpectedState<T extends LayoutTrack,java.lang.Integer>
- Parameters:
state
- the new expected state- Throws:
java.lang.UnsupportedOperationException
- if the implementing class does not allow states to be set
-
getObject
public T getObject()
Description copied from interface:ExpectedState
Get the Object this records the expected state for.- Specified by:
getObject
in interfaceExpectedState<T extends LayoutTrack,java.lang.Integer>
- Returns:
- the associated object
-
-