Package jmri

Interface SignalSystem

  • All Superinterfaces:
    java.lang.Comparable<NamedBean>, NamedBean, PropertyChangeProvider
    All Known Implementing Classes:

    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.

    • 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.
        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.
        all image types or an empty list
      • getAspects

        java.util.Enumeration<java.lang.String> getAspects()
        Get all aspects currently defined.
        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.

        all keys or an empty list
      • checkAspect

        boolean checkAspect​(java.lang.String aspect)
        Is this aspect known?
        aspect - the aspect to check
        true if known; false otherwise
      • getAspect

        java.lang.String getAspect​(java.lang.Object obj,
                                   java.lang.String key)
      • 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.

        summary string.