Top Description Fields Constructors Methods
org.eclipse.collections.impl.utility.primitive

public final Class IntQuickSort

extends Object
Class Inheritance
Imports
org.eclipse.collections.api.block.comparator.primitive.IntComparator

IntQuickSort is an implementation of the Quick Sort algorithm as described in Donald Knuth's TAOCP with some optimizations. It supports indirect array sorting based on primitive comparators and/or key values extracted from the array values if a sort order other thant the natural one of the array elements is required. This file was automatically generated from template file primitiveSort.stg.

Field Summary

Modifier and TypeField and Description
private static final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static void
insertionSort(int[] array, int left, int right, IntComparator comparator)

public static void
sort(int[] array, int left, int right, IntComparator comparator)

private static void
swap(int[] array, int i1, int i2)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

SORT_SMALL_SIZEback to summary
private static final int SORT_SMALL_SIZE

Constructor Detail

IntQuickSortback to summary
private IntQuickSort()

Method Detail

insertionSortback to summary
private static void insertionSort(int[] array, int left, int right, IntComparator comparator)
sortback to summary
public static void sort(int[] array, int left, int right, IntComparator comparator)
swapback to summary
private static void swap(int[] array, int i1, int i2)