Class MappingElementImpl

    • Constructor Detail

      • MappingElementImpl

        public MappingElementImpl()
        Create new MappingElementImpl with no corresponding name. This constructor should only be used for cloning and archiving.
      • MappingElementImpl

        public MappingElementImpl​(String name)
        Creates new MappingElementImpl with the corresponding name
        Parameters:
        name - the name of the element
    • Method Detail

      • getMessages

        protected static final ResourceBundle getMessages()
        Returns:
        I18N message handler for this element
      • toString

        public String toString()
        Overrides Object's toString method to return the name of this mapping element.
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object
      • equals

        public boolean equals​(Object obj)
        Overrides Object's equals method by comparing the name of this mapping element with the name of the argument obj. The method returns false if obj does not have the same dynamic type as this mapping element.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if this object is the same as the obj argument; false otherwise.
      • hashCode

        public int hashCode()
        Overrides Object's hashCode method to return the hashCode of this mapping element's name.
        Overrides:
        hashCode in class Object
        Returns:
        a hash code value for this object.
      • firePropertyChange

        protected void firePropertyChange​(String name,
                                          Object o,
                                          Object n)
        Fires property change event.
        Parameters:
        name - property name
        o - old value
        n - new value
      • getName

        public String getName()
        Get the name of this mapping element.
        Specified by:
        getName in interface MappingElement
        Returns:
        the name
      • compareTo

        public int compareTo​(Object o)
        Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The specified object must be mapping element, meaning it must be an instance of class MappingElementImpl or any subclass. If not a ClassCastException is thrown. The order of MappingElementImpl objects is defined by the order of their names. Mapping elements without name are considered to be less than any named mapping element.
        Specified by:
        compareTo in interface Comparable
        Parameters:
        o - the Object to be compared.
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        Throws:
        ClassCastException - - if the specified object is null or is not an instance of MappingElementImpl