public abstract class PrimitiveSort extends Object
Modifier | Constructor and Description |
---|---|
protected |
PrimitiveSort() |
Modifier and Type | Method and Description |
---|---|
protected static int[] |
buildIndex(int len) |
protected static void |
sort(byte[] a,
int fromIndex,
int toIndex,
ByteComparator c)
Sorts the specified array of
byte s, according to the provided
ByteComparator . |
protected static void |
sort(char[] a,
int fromIndex,
int toIndex,
CharComparator c)
Sorts the specified array of
char s, according to the provided
CharComparator . |
protected static void |
sort(double[] a,
int fromIndex,
int toIndex,
DoubleComparator c)
Sorts the specified array of
double s, according to the provided
DoubleComparator . |
protected static void |
sort(float[] a,
int fromIndex,
int toIndex,
FloatComparator c)
Sorts the specified array of
float s, according to the provided
FloatComparator . |
protected static void |
sort(int[] a,
int fromIndex,
int toIndex,
IntComparator c)
Sorts the specified array of
int s, according to the provided
IntComparator . |
protected static void |
sort(long[] a,
int fromIndex,
int toIndex,
LongComparator c)
Sorts the specified array of
long s, according to the provided
LongComparator . |
protected static void |
sort(short[] a,
int fromIndex,
int toIndex,
ShortComparator c)
Sorts the specified array of
short s, according to the provided
ShortComparator . |
protected static void |
sortIndexed(List<?> data,
int[] idx,
IntComparator c) |
protected static void |
sortIndexed(Object[] data,
int[] idx,
IntComparator c) |
protected static void |
sortPaired(Object[] data,
byte[] order,
int fromIndex,
int toIndex,
ByteComparator comparator) |
protected static void |
sortPaired(Object[] data,
char[] order,
int fromIndex,
int toIndex,
CharComparator comparator) |
protected static void |
sortPaired(Object[] data,
double[] order,
int fromIndex,
int toIndex,
DoubleComparator comparator) |
protected static void |
sortPaired(Object[] data,
float[] order,
int fromIndex,
int toIndex,
FloatComparator comparator) |
protected static void |
sortPaired(Object[] data,
int[] order,
int fromIndex,
int toIndex,
IntComparator comparator) |
protected static void |
sortPaired(Object[] data,
long[] order,
int fromIndex,
int toIndex,
LongComparator comparator) |
protected static void |
sortPaired(Object[] data,
short[] order,
int fromIndex,
int toIndex,
ShortComparator comparator) |
protected static int[] buildIndex(int len)
protected static void sort(byte[] a, int fromIndex, int toIndex, ByteComparator c)
byte
s, according to the provided
ByteComparator
.a
- The array of byte
s.fromIndex
- The index of the first element, inclusive, to be sorted.toIndex
- The index of the last element, exclusive, to be sorted.c
- The comparator to use.NullPointerException
- If a
or c
is null.protected static void sort(char[] a, int fromIndex, int toIndex, CharComparator c)
char
s, according to the provided
CharComparator
.a
- The array of char
s.fromIndex
- The index of the first element, inclusive, to be sorted.toIndex
- The index of the last element, exclusive, to be sorted.c
- The comparator to use.NullPointerException
- If a
or c
is null.protected static void sort(short[] a, int fromIndex, int toIndex, ShortComparator c)
short
s, according to the provided
ShortComparator
.a
- The array of short
s.fromIndex
- The index of the first element, inclusive, to be sorted.toIndex
- The index of the last element, exclusive, to be sorted.c
- The comparator to use.NullPointerException
- If a
or c
is null.protected static void sort(int[] a, int fromIndex, int toIndex, IntComparator c)
int
s, according to the provided
IntComparator
.a
- The array of int
s.fromIndex
- The index of the first element, inclusive, to be sorted.toIndex
- The index of the last element, exclusive, to be sorted.c
- The comparator to use.NullPointerException
- If a
or c
is null.protected static void sort(long[] a, int fromIndex, int toIndex, LongComparator c)
long
s, according to the provided
LongComparator
.a
- The array of long
s.fromIndex
- The index of the first element, inclusive, to be sorted.toIndex
- The index of the last element, exclusive, to be sorted.c
- The comparator to use.NullPointerException
- If a
or c
is null.protected static void sort(float[] a, int fromIndex, int toIndex, FloatComparator c)
float
s, according to the provided
FloatComparator
.a
- The array of float
s.fromIndex
- The index of the first element, inclusive, to be sorted.toIndex
- The index of the last element, exclusive, to be sorted.c
- The comparator to use.NullPointerException
- If a
or c
is null.protected static void sort(double[] a, int fromIndex, int toIndex, DoubleComparator c)
double
s, according to the provided
DoubleComparator
.a
- The array of double
s.fromIndex
- The index of the first element, inclusive, to be sorted.toIndex
- The index of the last element, exclusive, to be sorted.c
- The comparator to use.NullPointerException
- If a
or c
is null.protected static void sortIndexed(Object[] data, int[] idx, IntComparator c)
protected static void sortIndexed(List<?> data, int[] idx, IntComparator c)
protected static void sortPaired(Object[] data, byte[] order, int fromIndex, int toIndex, ByteComparator comparator)
protected static void sortPaired(Object[] data, char[] order, int fromIndex, int toIndex, CharComparator comparator)
protected static void sortPaired(Object[] data, short[] order, int fromIndex, int toIndex, ShortComparator comparator)
protected static void sortPaired(Object[] data, int[] order, int fromIndex, int toIndex, IntComparator comparator)
protected static void sortPaired(Object[] data, long[] order, int fromIndex, int toIndex, LongComparator comparator)
protected static void sortPaired(Object[] data, float[] order, int fromIndex, int toIndex, FloatComparator comparator)
protected static void sortPaired(Object[] data, double[] order, int fromIndex, int toIndex, DoubleComparator comparator)
Copyright © 2020 LibJ. All rights reserved.