- java.lang.Object
-
- jmri.beans.UnboundBean
-
- jmri.beans.Bean
-
- jmri.util.NamedBeanExpectedValue<T,java.lang.Integer>
-
- jmri.util.NamedBeanExpectedState<T>
-
- Type Parameters:
T
- the supported type of NamedBean
- All Implemented Interfaces:
BeanInterface
,PropertyChangeFirer
,PropertyChangeProvider
,ExpectedState<T,java.lang.Integer>
- Direct Known Subclasses:
BeanSetting
public class NamedBeanExpectedState<T extends NamedBean> extends NamedBeanExpectedValue<T,java.lang.Integer>
Retain a NamedBean 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 NamedBeanExpectedState(T bean, java.lang.Integer state)
NamedBeanExpectedState(T bean, java.lang.String name, java.lang.Integer state)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setExpectedState(java.lang.Integer state)
Set the expected state.-
Methods inherited from class jmri.util.NamedBeanExpectedValue
getExpectedState, getName, getObject
-
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
-
NamedBeanExpectedState
public NamedBeanExpectedState(@Nonnull T bean, @Nonnull java.lang.String name, @Nonnull java.lang.Integer state)
-
NamedBeanExpectedState
public NamedBeanExpectedState(@Nonnull T bean, @Nonnull java.lang.Integer state)
-
-
Method Detail
-
setExpectedState
public void setExpectedState(@Nonnull java.lang.Integer state)
Set the expected state.If UnsupportedOperationException is not thrown, this must fire a
PropertyChangeEvent
with the name "expectedState"This implementation requires a non-null parameter.
- Specified by:
setExpectedState
in interfaceExpectedState<T extends NamedBean,java.lang.Integer>
- Overrides:
setExpectedState
in classNamedBeanExpectedValue<T extends NamedBean,java.lang.Integer>
- Parameters:
state
- the new expected state- Throws:
java.lang.NullPointerException
- if state is null
-
-