Class DefaultIdTag

All Implemented Interfaces:
Comparable<NamedBean>, PropertyChangeProvider, IdTag, NamedBean, Reportable
Direct Known Subclasses:
DefaultRailCom, TranspondingTag

public class DefaultIdTag
extends AbstractIdTag
Concrete implementation of the IdTag interface for the Internal system.
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.

Since:
2.11.4
  • Constructor Details

  • Method Details

    • setWhereLastSeen

      public final void setWhereLastSeen​(Reporter r)
      Description copied from interface: IdTag
      Set the Reporter that last saw this tag.

      Also sets the Date/Time when last seen

      Parameters:
      r - Reporter object where last seen
      See Also:
      IdTag.getWhereLastSeen(), IdTag.getWhenLastSeen()
    • setState

      public void setState​(int s) throws JmriException
      Description copied from interface: NamedBean
      Provide generic access to internal state.

      This generally shouldn't be used by Java code; use the class-specific form instead (e.g. setCommandedState in Turnout). This is provided to make scripts access easier to read.

      Parameters:
      s - the state
      Throws:
      JmriException - general error when setting the state fails
    • getState

      public int getState()
      Description copied from interface: NamedBean
      Provide generic access to internal state.

      This generally shouldn't be used by Java code; use the class-specific form instead (e.g. getCommandedState in Turnout). This is provided to make scripts easier to read.

      Returns:
      the state
    • store

      public Element store​(boolean storeState)
      Description copied from interface: IdTag
      Store the contents of this IdTag object as an XML element
      Parameters:
      storeState - Determine if the state of this IdTag should be stored
      Returns:
      Element with IdTag contents
    • load

      public void load​(Element e)
      Description copied from interface: IdTag
      Load contents of IdTag object from an XML element
      Parameters:
      e - Element containing IdTag details