Class SortedVector<E>

    • Constructor Detail

      • SortedVector

        public SortedVector​(SortedVector.Comparator comparator)
        Create a new sorted vector and use the given comparator to determine order.
        Parameters:
        comparator - The comparator to use to determine what order to place the elements in this vector.
    • Method Detail

      • addElement

        public void addElement​(E element)
        Adds an element in the Vector, sorted from greatest to least.
        Overrides:
        addElement in class Vector<E>
        Parameters:
        element - The element to add to the Vector
      • sort

        public void sort()
        Sort the vector.