Class CollectionUtil.ListIntroSorter<T>

    • Field Detail

      • pivot

        T pivot
      • list

        final java.util.List<T> list
      • comp

        final java.util.Comparator<? super T> comp
    • Constructor Detail

      • ListIntroSorter

        ListIntroSorter​(java.util.List<T> list,
                        java.util.Comparator<? super T> comp)
    • Method Detail

      • swap

        protected void swap​(int i,
                            int j)
        Description copied from class: Sorter
        Swap values at slots i and j.
        Specified by:
        swap in class Sorter
      • compare

        protected int compare​(int i,
                              int j)
        Description copied from class: Sorter
        Compare entries found in slots i and j. The contract for the returned value is the same as Comparator.compare(Object, Object).
        Overrides:
        compare in class IntroSorter