Class SortedVector<E>

    • Constructor Detail

      • SortedVector

        public SortedVector​(SortedVector.Comparator comparator)
        Create a new sorted vector and use the given comparator to determine order.
        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.
        addElement in class Vector<E>
        element - The element to add to the Vector
      • sort

        public void sort()
        Sort the vector.