Class DefaultMemory

All Implemented Interfaces:
Comparable<NamedBean>, PropertyChangeProvider, Memory, NamedBean

public class DefaultMemory
extends AbstractMemory
Concrete implementation of the Reporter interface for the Internal system.
  • Constructor Details

  • Method Details

    • getState

      public int getState()
      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 provided to make Jython script access easier to read.

      If the current value can be reduced to an integer, that is returned, otherwise a value of -1 is returned.

      Returns:
      the state
    • setState

      public void setState​(int s)
      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