Package jmri.jmrix

Class AbstractMessage

    • Method Detail

      • getElement

        public int getElement​(int n)
        Get a particular element in a Message.
        Specified by:
        getElement in interface Message
        Parameters:
        n - Element Index.
        Returns:
        single element of message.
      • setElement

        public void setElement​(int n,
                               int v)
        Set a single Data Element at a particular index.
        Specified by:
        setElement in interface Message
        Parameters:
        n - index of element.
        v - value of element.
      • equals

        public boolean equals​(java.lang.Object obj)
        Equals operator compares only base data.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Hash code from base data.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashcode from sum of elements.