Interface SignalSystem
-
- All Superinterfaces:
java.lang.Comparable<NamedBean>
,NamedBean
,PropertyChangeProvider
- All Known Implementing Classes:
DefaultSignalSystem
public interface SignalSystem extends NamedBean
A SignalSystem defines a signalling system by representing the properties of various signal aspects it contains.At present, the signal aspects are enumerated by Strings, not by specific objects; this table exists to attach properties to those Strings.
Setting or getting the "state" of one of these will throw an error.
You'll have one of these objects for each signaling _system_ on your railroad. In turn, these will be used by 1 to N specific mappings to appearances, see e.g.
SignalAppearanceMap
.Insertion order is preserved when retrieving keys.
This file is part of JMRI.JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
-
-
Field Summary
-
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_STATE, QUOTED_NAME_FORMAT, UNKNOWN
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
checkAspect(java.lang.String aspect)
Is this aspect known?java.lang.String
getAspect(java.lang.Object obj, java.lang.String key)
java.util.Enumeration<java.lang.String>
getAspects()
Get all aspects currently defined.java.util.Enumeration<java.lang.String>
getImageTypeList()
Returns a list of the image/icon sets available for use with this signaling system.java.util.Enumeration<java.lang.String>
getKeys()
Get all keys currently defined on any aspect.float
getMaximumLineSpeed()
java.lang.Object
getProperty(java.lang.String aspect, java.lang.String key)
void
setImageType(java.lang.String type)
Add an image or icon type available for use with this signaling system.void
setProperty(java.lang.String aspect, java.lang.String key, java.lang.Object value)
java.lang.String
summary()
Provide a multi-line summary of the signal system content, typically for printing.-
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, dispose, getBeanType, getComment, getDisplayName, getDisplayName, 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
-
-
-
-
Method Detail
-
setProperty
void setProperty(java.lang.String aspect, java.lang.String key, java.lang.Object value)
-
getProperty
java.lang.Object getProperty(java.lang.String aspect, java.lang.String key)
-
setImageType
void setImageType(java.lang.String type)
Add an image or icon type available for use with this signaling system.- Parameters:
type
- the image type
-
getImageTypeList
java.util.Enumeration<java.lang.String> getImageTypeList()
Returns a list of the image/icon sets available for use with this signaling system.- Returns:
- all image types or an empty list
-
getAspects
java.util.Enumeration<java.lang.String> getAspects()
Get all aspects currently defined.- Returns:
- all aspects or an empty list
-
getKeys
java.util.Enumeration<java.lang.String> getKeys()
Get all keys currently defined on any aspect.Each key only appears once, even if used on more than one aspect.
Note that a given key may or may not appear on a given aspect.
- Returns:
- all keys or an empty list
-
checkAspect
boolean checkAspect(java.lang.String aspect)
Is this aspect known?- Parameters:
aspect
- the aspect to check- Returns:
- true if known; false otherwise
-
getAspect
java.lang.String getAspect(java.lang.Object obj, java.lang.String key)
-
getMaximumLineSpeed
float getMaximumLineSpeed()
-
summary
java.lang.String summary()
Provide a multi-line summary of the signal system content, typically for printing.Not intended for further parsing, i.e. for persistance, as format likely to differ from type to type, and to change often.
- Returns:
- summary string.
-
-