Class AbstractStringAction

    • Method Detail

      • getParent

        public Base getParent()
        Get the parent.

        The following rules apply

        • LogixNGs has no parent. The method throws an UnsupportedOperationException if called.
        • Expressions and actions has the male socket that they are connected to as their parent.
        • Male sockets has the female socket that they are connected to as their parent.
        • The parent of a female sockets is the LogixNG, expression or action that has this female socket.
        • The parent of a male sockets is the same parent as the expression or action that it contains.
        Specified by:
        getParent in interface Base
        Returns:
        the parent of this object
      • setParent

        public void setParent​(Base parent)
        Set the parent.

        The following rules apply

        • ExecutionGroups has no parent. The method throws an UnsupportedOperationException if called.
        • LogixNGs has the execution group as its parent.
        • Expressions and actions has the male socket that they are connected to as their parent.
        • Male sockets has the female socket that they are connected to as their parent.
        • The parent of a female sockets is the LogixNG, expression or action that has this female socket.
        • The parent of a male sockets is the same parent as the expression or action that it contains.
        Specified by:
        setParent in interface Base
        Parameters:
        parent - the new parent of this object
      • 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
      • 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