| Modifier and Type | Method and Description |
|---|---|
static void |
sort(boolean[] a)
Sorts the given array so that all the
false values are at the
beginning. |
static void |
sort(boolean[] a,
BooleanComparator c)
Sorts the given array by the given comparator.
|
static void |
sort(boolean[] a,
int fromIndex,
int toIndex)
Sorts the indicated portion of the given array so that all the
false values are at the beginning. |
static void |
sort(boolean[] a,
int fromIndex,
int toIndex,
BooleanComparator c)
Sorts the indicated portion of the given array by the given comparator.
|
static void |
sort(byte[] a,
ByteComparator c)
Sorts the given array by the given comparator.
|
static void |
sort(byte[] a,
int fromIndex,
int toIndex,
ByteComparator c)
Sorts the indicated portion of the given array by the given comparator.
|
static void |
sort(char[] a,
CharComparator c)
Sorts the given array by the given comparator.
|
static void |
sort(char[] a,
int fromIndex,
int toIndex,
CharComparator c)
Sorts the indicated portion of the given array by the given comparator.
|
static void |
sort(double[] a,
DoubleComparator c)
Sorts the given array by the given comparator.
|
static void |
sort(double[] a,
int fromIndex,
int toIndex,
DoubleComparator c)
Sorts the indicated portion of the given array by the given comparator.
|
static void |
sort(float[] a,
FloatComparator c)
Sorts the given array by the given comparator.
|
static void |
sort(float[] a,
int fromIndex,
int toIndex,
FloatComparator c)
Sorts the indicated portion of the given array by the given comparator.
|
static void |
sort(int[] a,
IntComparator c)
Sorts the given array by the given comparator.
|
static void |
sort(int[] a,
int fromIndex,
int toIndex,
IntComparator c)
Sorts the indicated portion of the given array by the given comparator.
|
static void |
sort(long[] a,
int fromIndex,
int toIndex,
LongComparator c)
Sorts the indicated portion of the given array by the given comparator.
|
static void |
sort(long[] a,
LongComparator c)
Sorts the given array by the given comparator.
|
static void |
sort(short[] a,
int fromIndex,
int toIndex,
ShortComparator c)
Sorts the indicated portion of the given array by the given comparator.
|
static void |
sort(short[] a,
ShortComparator c)
Sorts the given array by the given comparator.
|
public static void sort(boolean[] a)
false values are at the
beginning.a - the array to sortNullPointerException - if a == nullpublic static void sort(boolean[] a,
int fromIndex,
int toIndex)
false values are at the beginning.a - the array to sortfromIndex - the index (inclusive) marking the beginning of the array
portiontoIndex - the index (exclusive) marking the end of the array portionNullPointerException - if a == nullArrayIndexOutOfBoundsException - if fromIndex < 0 or
toIndex > a.lengthIllegalArgumentException - if fromIndex > toIndexpublic static void sort(boolean[] a,
BooleanComparator c)
a - the array to sortc - the comparator to use for sorting the array, or null for
natural orderingNullPointerException - if a == nullIllegalArgumentException - if sorting finds that c violates
the BooleanComparator contractpublic static void sort(boolean[] a,
int fromIndex,
int toIndex,
BooleanComparator c)
a - the array to sortfromIndex - the index (inclusive) marking the beginning of the array
portiontoIndex - the index (exclusive) marking the end of the array portionc - the comparator to use for sorting the array, or null for
natural orderingNullPointerException - if a == nullArrayIndexOutOfBoundsException - if fromIndex < 0 or
toIndex > a.lengthIllegalArgumentException - if fromIndex > toIndex or
sorting finds that c violates the BooleanComparator
contractpublic static void sort(byte[] a,
ByteComparator c)
a - the array to sortc - the comparator to use for sorting the array, or null for
natural orderingNullPointerException - if a == nullIllegalArgumentException - if sorting finds that c violates
the ByteComparator contractpublic static void sort(byte[] a,
int fromIndex,
int toIndex,
ByteComparator c)
a - the array to sortfromIndex - the index (inclusive) marking the beginning of the array
portiontoIndex - the index (exclusive) marking the end of the array portionc - the comparator to use for sorting the array, or null for
natural orderingNullPointerException - if a == nullArrayIndexOutOfBoundsException - if fromIndex < 0 or
toIndex > a.lengthIllegalArgumentException - if fromIndex > toIndex or
sorting finds that c violates the ByteComparator
contractpublic static void sort(char[] a,
CharComparator c)
a - the array to sortc - the comparator to use for sorting the array, or null for
natural orderingNullPointerException - if a == nullIllegalArgumentException - if sorting finds that c violates
the CharComparator contractpublic static void sort(char[] a,
int fromIndex,
int toIndex,
CharComparator c)
a - the array to sortfromIndex - the index (inclusive) marking the beginning of the array
portiontoIndex - the index (exclusive) marking the end of the array portionc - the comparator to use for sorting the array, or null for
natural orderingNullPointerException - if a == nullArrayIndexOutOfBoundsException - if fromIndex < 0 or
toIndex > a.lengthIllegalArgumentException - if fromIndex > toIndex or
sorting finds that c violates the CharComparator
contractpublic static void sort(double[] a,
DoubleComparator c)
a - the array to sortc - the comparator to use for sorting the array, or null for
natural orderingNullPointerException - if a == nullIllegalArgumentException - if sorting finds that c violates
the DoubleComparator contractpublic static void sort(double[] a,
int fromIndex,
int toIndex,
DoubleComparator c)
a - the array to sortfromIndex - the index (inclusive) marking the beginning of the array
portiontoIndex - the index (exclusive) marking the end of the array portionc - the comparator to use for sorting the array, or null for
natural orderingNullPointerException - if a == nullArrayIndexOutOfBoundsException - if fromIndex < 0 or
toIndex > a.lengthIllegalArgumentException - if fromIndex > toIndex or
sorting finds that c violates the DoubleComparator
contractpublic static void sort(float[] a,
FloatComparator c)
a - the array to sortc - the comparator to use for sorting the array, or null for
natural orderingNullPointerException - if a == nullIllegalArgumentException - if sorting finds that c violates
the FloatComparator contractpublic static void sort(float[] a,
int fromIndex,
int toIndex,
FloatComparator c)
a - the array to sortfromIndex - the index (inclusive) marking the beginning of the array
portiontoIndex - the index (exclusive) marking the end of the array portionc - the comparator to use for sorting the array, or null for
natural orderingNullPointerException - if a == nullArrayIndexOutOfBoundsException - if fromIndex < 0 or
toIndex > a.lengthIllegalArgumentException - if fromIndex > toIndex or
sorting finds that c violates the FloatComparator
contractpublic static void sort(int[] a,
IntComparator c)
a - the array to sortc - the comparator to use for sorting the array, or null for
natural orderingNullPointerException - if a == nullIllegalArgumentException - if sorting finds that c violates
the IntComparator contractpublic static void sort(int[] a,
int fromIndex,
int toIndex,
IntComparator c)
a - the array to sortfromIndex - the index (inclusive) marking the beginning of the array
portiontoIndex - the index (exclusive) marking the end of the array portionc - the comparator to use for sorting the array, or null for
natural orderingNullPointerException - if a == nullArrayIndexOutOfBoundsException - if fromIndex < 0 or
toIndex > a.lengthIllegalArgumentException - if fromIndex > toIndex or
sorting finds that c violates the IntComparator
contractpublic static void sort(long[] a,
LongComparator c)
a - the array to sortc - the comparator to use for sorting the array, or null for
natural orderingNullPointerException - if a == nullIllegalArgumentException - if sorting finds that c violates
the LongComparator contractpublic static void sort(long[] a,
int fromIndex,
int toIndex,
LongComparator c)
a - the array to sortfromIndex - the index (inclusive) marking the beginning of the array
portiontoIndex - the index (exclusive) marking the end of the array portionc - the comparator to use for sorting the array, or null for
natural orderingNullPointerException - if a == nullArrayIndexOutOfBoundsException - if fromIndex < 0 or
toIndex > a.lengthIllegalArgumentException - if fromIndex > toIndex or
sorting finds that c violates the LongComparator
contractpublic static void sort(short[] a,
ShortComparator c)
a - the array to sortc - the comparator to use for sorting the array, or null for
natural orderingNullPointerException - if a == nullIllegalArgumentException - if sorting finds that c violates
the ShortComparator contractpublic static void sort(short[] a,
int fromIndex,
int toIndex,
ShortComparator c)
a - the array to sortfromIndex - the index (inclusive) marking the beginning of the array
portiontoIndex - the index (exclusive) marking the end of the array portionc - the comparator to use for sorting the array, or null for
natural orderingNullPointerException - if a == nullArrayIndexOutOfBoundsException - if fromIndex < 0 or
toIndex > a.lengthIllegalArgumentException - if fromIndex > toIndex or
sorting finds that c violates the ShortComparator
contractCopyright © 2014. All rights reserved.