Class DebuggerMaleAnalogActionSocket

    • Method Detail

      • setValue

        public void setValue​(double value)
                      throws JmriException
        Description copied from interface: MaleAnalogActionSocket
        Set an analog value.

        This method must ensure that the value is not a Double.NaN, negative infinity or positive infinity. If that is the case, it must throw an IllegalArgumentException before checking if an error has occured.

        Specified by:
        setValue in interface AnalogAction
        Specified by:
        setValue in interface MaleAnalogActionSocket
        Parameters:
        value - the value. The male socket that holds this action ensures that this value is not Double.NaN or an infinite value.
        Throws:
        JmriException - when an exception occurs
      • 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.

        Specified by:
        setState in interface NamedBean
        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.

        Specified by:
        getState in interface NamedBean
        Returns:
        the state
      • describeState

        public java.lang.String describeState​(int state)
        Description copied from interface: NamedBean
        Provide human-readable, localized version of state value.

        This method is intended for use when presenting to a human operator.

        Specified by:
        describeState in interface NamedBean
        Parameters:
        state - the state to describe
        Returns:
        the state in localized form
      • setProperty

        public void setProperty​(java.lang.String key,
                                java.lang.Object value)
        Description copied from interface: NamedBean
        Attach a key/value pair to the NamedBean, which can be retrieved later. These are not bound properties as yet, and don't throw events on modification. Key must not be null.

        Prior to JMRI 4.3, the key was of Object type. It was constrained to String to make these more like normal Java Beans.

        Specified by:
        setProperty in interface NamedBean
        Parameters:
        key - the property to set
        value - the value of the property
      • getProperty

        public java.lang.Object getProperty​(java.lang.String key)
        Description copied from interface: NamedBean
        Retrieve the value associated with a key. If no value has been set for that key, returns null.
        Specified by:
        getProperty in interface NamedBean
        Parameters:
        key - the property to get
        Returns:
        The value of the property or null.
      • removeProperty

        public void removeProperty​(java.lang.String key)
        Description copied from interface: NamedBean
        Remove the key/value pair against the NamedBean.
        Specified by:
        removeProperty in interface NamedBean
        Parameters:
        key - the property to remove
      • getPropertyKeys

        public java.util.Set<java.lang.String> getPropertyKeys()
        Description copied from interface: NamedBean
        Retrieve the complete current set of keys.
        Specified by:
        getPropertyKeys in interface NamedBean
        Returns:
        empty set if none
      • 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
      • compareSystemNameSuffix

        public int compareSystemNameSuffix​(java.lang.String suffix1,
                                           java.lang.String suffix2,
                                           NamedBean n2)
        Description copied from interface: NamedBean
        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.
        Specified by:
        compareSystemNameSuffix in interface NamedBean
        Parameters:
        suffix1 - The suffix for the 1st bean in the comparison
        suffix2 - The suffix for the 2nd bean in the comparison
        n2 - 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.