public class ArraySorter extends Object
Constructor and Description |
---|
ArraySorter() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
sort(byte[] array)
Sorts and returns the given array.
|
static char[] |
sort(char[] array)
Sorts and returns the given array.
|
static double[] |
sort(double[] array)
Sorts and returns the given array.
|
static float[] |
sort(float[] array)
Sorts and returns the given array.
|
static int[] |
sort(int[] array)
Sorts and returns the given array.
|
static long[] |
sort(long[] array)
Sorts and returns the given array.
|
static short[] |
sort(short[] array)
Sorts and returns the given array.
|
static <T> T[] |
sort(T[] array)
Sorts and returns the given array.
|
static <T> T[] |
sort(T[] array,
Comparator<? super T> comparator)
Sorts and returns the given array.
|
public static byte[] sort(byte[] array)
array
- the array to sort.Arrays.sort(byte[])
public static char[] sort(char[] array)
array
- the array to sort.Arrays.sort(char[])
public static double[] sort(double[] array)
array
- the array to sort.Arrays.sort(double[])
public static float[] sort(float[] array)
array
- the array to sort.Arrays.sort(float[])
public static int[] sort(int[] array)
array
- the array to sort.Arrays.sort(int[])
public static long[] sort(long[] array)
array
- the array to sort.Arrays.sort(long[])
public static short[] sort(short[] array)
array
- the array to sort.Arrays.sort(short[])
public static <T> T[] sort(T[] array)
T
- the array type.array
- the array to sort.Arrays.sort(Object[])
public static <T> T[] sort(T[] array, Comparator<? super T> comparator)
T
- the array type.array
- the array to sort.comparator
- the comparator to determine the order of the array. A null
value uses the elements'
natural ordering
.Arrays.sort(Object[])
Copyright © 2001–2021 The Apache Software Foundation. All rights reserved.