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

public final Class ByteQuickSort

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

ByteQuickSort 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(byte[] array, int left, int right, ByteComparator comparator)

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

private static void
swap(byte[] 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

ByteQuickSortback to summary
private ByteQuickSort()

Method Detail

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