Class NamePair

    • Constructor Detail

      • NamePair

        protected NamePair​(String name)
        Protected Constructor
        Parameters:
        name - (Display) Name of the Pair
    • Method Detail

      • getName

        public String getName()
        Returns display value
        Returns:
        name
      • getID

        public abstract String getID()
        Returns Key or Value as String
        Returns:
        String or null
      • compare

        public int compare​(Object o1,
                           Object o2)
        Comparator Interface (based on toString value)
        Specified by:
        compare in interface Comparator<Object>
        Parameters:
        o1 - Object 1
        o2 - Object 2
        Returns:
        compareTo value
      • compare

        public int compare​(NamePair o1,
                           NamePair o2)
        Comparator Interface (based on toString value)
        Parameters:
        o1 - Object 1
        o2 - Object 2
        Returns:
        compareTo value
      • compareTo

        public int compareTo​(Object o)
        Comparable Interface (based on toString value)
        Specified by:
        compareTo in interface Comparable<Object>
        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.
      • compareTo

        public int compareTo​(NamePair o)
        Comparable Interface (based on toString value)
        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.
      • toString

        public String toString()
        To String - returns name
        Overrides:
        toString in class Object
        Returns:
        Name
      • toStringX

        public String toStringX()
        To String - detail
        Returns:
        String in format ID=Name