Package org.apache.commons.lang3
Class ArraySorter
- java.lang.Object
-
- org.apache.commons.lang3.ArraySorter
-
public class ArraySorter extends java.lang.ObjectSorts and returns arrays in the fluent style.- Since:
- 3.12.0
-
-
Constructor Summary
Constructors Constructor Description ArraySorter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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, java.util.Comparator<? super T> comparator)Sorts and returns the given array.
-
-
-
Method Detail
-
sort
public static byte[] sort(byte[] array)
Sorts and returns the given array.- Parameters:
array- the array to sort.- Returns:
- the given array.
- See Also:
Arrays.sort(byte[])
-
sort
public static char[] sort(char[] array)
Sorts and returns the given array.- Parameters:
array- the array to sort.- Returns:
- the given array.
- See Also:
Arrays.sort(char[])
-
sort
public static double[] sort(double[] array)
Sorts and returns the given array.- Parameters:
array- the array to sort.- Returns:
- the given array.
- See Also:
Arrays.sort(double[])
-
sort
public static float[] sort(float[] array)
Sorts and returns the given array.- Parameters:
array- the array to sort.- Returns:
- the given array.
- See Also:
Arrays.sort(float[])
-
sort
public static int[] sort(int[] array)
Sorts and returns the given array.- Parameters:
array- the array to sort.- Returns:
- the given array.
- See Also:
Arrays.sort(int[])
-
sort
public static long[] sort(long[] array)
Sorts and returns the given array.- Parameters:
array- the array to sort.- Returns:
- the given array.
- See Also:
Arrays.sort(long[])
-
sort
public static short[] sort(short[] array)
Sorts and returns the given array.- Parameters:
array- the array to sort.- Returns:
- the given array.
- See Also:
Arrays.sort(short[])
-
sort
public static <T> T[] sort(T[] array)
Sorts and returns the given array.- Type Parameters:
T- the array type.- Parameters:
array- the array to sort.- Returns:
- the given array.
- See Also:
Arrays.sort(Object[])
-
sort
public static <T> T[] sort(T[] array, java.util.Comparator<? super T> comparator)Sorts and returns the given array.- Type Parameters:
T- the array type.- Parameters:
array- the array to sort.comparator- the comparator to determine the order of the array. Anullvalue uses the elements'natural ordering.- Returns:
- the given array.
- See Also:
Arrays.sort(Object[])
-
-