Class Sorter

    • Constructor Detail

      • Sorter

        protected Sorter()
        Sole constructor, used for inheritance.
    • Method Detail

      • compare

        protected abstract int compare​(int i,
                                       int j)
        Compare entries found in slots i and j. The contract for the returned value is the same as Comparator.compare(Object, Object).
      • swap

        protected abstract void swap​(int i,
                                     int j)
        Swap values at slots i and j.
      • sort

        public abstract void sort​(int from,
                                  int to)
        Sort the slice which starts at from (inclusive) and ends at to (exclusive).