Class UniqueList<T extends java.lang.Comparable<? super T>>

  • All Implemented Interfaces:
    java.io.Serializable

    public class UniqueList<T extends java.lang.Comparable<? super T>>
    extends SortedList<T>
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Detail

      • UniqueList

        public UniqueList()
      • UniqueList

        public UniqueList​(java.util.Comparator comparator)
    • Method Detail

      • getSortedIndex

        public int getSortedIndex​(T s)
      • contains

        public boolean contains​(T object)
        Overrides:
        contains in class SortedList<T extends java.lang.Comparable<? super T>>
      • getIndex

        public int getIndex​(T s)
        When objects were added after the last getIndex() call, then the original-index-map needs to be re-created.
        Overrides:
        getIndex in class SortedList<T extends java.lang.Comparable<? super T>>
        Returns:
      • add

        public int add​(T s)
        Description copied from class: SortedList
        Adds object to the list provided that it doesn't contain an object being considered equal by compareTo().
        Overrides:
        add in class SortedList<T extends java.lang.Comparable<? super T>>
        Returns:
        object's list index, no matter wether it was already in the list or after addition
      • add

        public int add​(int position,
                       T s)
      • get

        public T get​(int i)
        Description copied from class: SortedList
        Returns object at given index, or null if index==-1
        Overrides:
        get in class SortedList<T extends java.lang.Comparable<? super T>>
        Parameters:
        i - list index within list in original order
        Returns:
        string at position i of list in order of the creation
      • getSorted

        public T getSorted​(int i)
        Parameters:
        i - list index within sorted list
        Returns:
        string at position i of sorted list
      • toArray

        public T[] toArray​(T[] e)
        Overrides:
        toArray in class SortedList<T extends java.lang.Comparable<? super T>>
      • toSortedArray

        public T[] toSortedArray​(T[] e)