Class AbstractMemory

    • Constructor Detail

      • AbstractMemory

        public AbstractMemory​(java.lang.String systemName)
      • AbstractMemory

        public AbstractMemory​(java.lang.String systemName,
                              java.lang.String userName)
    • Method Detail

      • getBeanType

        public java.lang.String 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 interface NamedBean
        Returns:
        a string of the bean type, eg Turnout, Sensor etc
      • getValue

        public java.lang.Object getValue()
        Description copied from interface: Memory
        Get the stored value. The type of this depends on what was stored...
        Specified by:
        getValue in interface Memory
        Returns:
        the stored value
      • setValue

        public void setValue​(java.lang.Object v)
        Provide a general method for updating the report.
        Specified by:
        setValue in interface Memory
        Parameters:
        v - the value to store
      • compareSystemNameSuffix

        @CheckReturnValue
        public int compareSystemNameSuffix​(@Nonnull
                                           java.lang.String suffix1,
                                           @Nonnull
                                           java.lang.String suffix2,
                                           @Nonnull
                                           NamedBean n)
        Compare the suffix of this NamedBean's name with the suffix of the argument NamedBean's name for the NamedBean.compareTo(jmri.NamedBean) operation. This is intended to be a system-specific comparison that understands the various formats, etc. By default, does an alphanumeric-by-chunks comparison. Do a string comparison.
        Specified by:
        compareSystemNameSuffix in interface NamedBean
        Overrides:
        compareSystemNameSuffix in class AbstractNamedBean
        Parameters:
        suffix1 - The suffix for the 1st bean in the comparison
        suffix2 - The suffix for the 2nd bean in the comparison
        n - The other (second) NamedBean in the comparison
        Returns:
        -1,0,+1 for ordering if the names are well-formed; may not provide proper ordering if the names are not well-formed.