Package jmri.implementation
Class AbstractIdTag
java.lang.Object
jmri.implementation.AbstractNamedBean
jmri.implementation.AbstractIdTag
- All Implemented Interfaces:
Comparable<NamedBean>
,PropertyChangeProvider
,IdTag
,NamedBean
,Reportable
- Direct Known Subclasses:
DefaultIdTag
public abstract class AbstractIdTag extends AbstractNamedBean implements IdTag, Reportable
Abstract implementation of
IdTag
containing code common to all
concrete implementations. This implementation implements Reportable
.- Since:
- 2.11.4
-
Nested Class Summary
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
-
Field Summary
Fields Modifier and Type Field Description protected String
prefix
protected Date
whenLastSeen
protected Reporter
whereLastSeen
Fields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, register
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_STATE, QUOTED_NAME_FORMAT, UNKNOWN
-
Constructor Summary
Constructors Constructor Description AbstractIdTag(String systemName)
AbstractIdTag(String systemName, String userName)
-
Method Summary
Modifier and Type Method Description String
getBeanType()
For instances in the code where we are dealing with just a bean and a message needs to be passed to the user or in a log.String
getTagID()
Retrieve a string representation of this tag IDDate
getWhenLastSeen()
Return the Date/Time when this tag was last seen, or null if not yet seenReporter
getWhereLastSeen()
Return the Reporter that last saw this tag, or null if not yet seenString
toReportString()
The IDTag version of toReportString returns a string consisting of the user name (if defined) or Tag ID followed by the associated list of property values.Methods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, describeState, dispose, equals, firePropertyChange, getComment, getDisplayName, getDisplayName, getFullyFormattedDisplayName, getFullyFormattedDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getPropertyKeys, getSystemName, getUserName, hashCode, removeProperty, removePropertyChangeListener, removePropertyChangeListener, setComment, setProperty, setUserName, toString, toStringSuffix, updateListenerRef, vetoableChange
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, dispose, getComment, getDisplayName, getDisplayName, getFullyFormattedDisplayName, getFullyFormattedDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getState, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setState, setUserName, toString, updateListenerRef, vetoableChange
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
Constructor Details
-
Method Details
-
getTagID
Description copied from interface:IdTag
Retrieve a string representation of this tag IDThis is the system name without the identifier
-
getWhereLastSeen
Description copied from interface:IdTag
Return the Reporter that last saw this tag, or null if not yet seen- Specified by:
getWhereLastSeen
in interfaceIdTag
- Returns:
- Reporter object where last seen, or null
-
getWhenLastSeen
Description copied from interface:IdTag
Return the Date/Time when this tag was last seen, or null if not yet seen- Specified by:
getWhenLastSeen
in interfaceIdTag
- Returns:
- Date object when last seen, or null
-
toReportString
The IDTag version of toReportString returns a string consisting of the user name (if defined) or Tag ID followed by the associated list of property values.- Specified by:
toReportString
in interfaceReportable
- Returns:
- a report string representing the Object.
-
getBeanType
Description copied from interface:NamedBean
For instances in the code where we are dealing with just a bean and a message needs to be passed to the user or in a log.- Specified by:
getBeanType
in interfaceNamedBean
- Returns:
- a string of the bean type, eg Turnout, Sensor etc
-