Class ArraysHelper
java.lang.Object
org.magicwerk.brownies.collections.helper.ArraysHelper
The class ArraysHelper adds method for handling boolean arrays which are missing in java.util.Arrays, e.g. sort() and binarySearch().
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intbinarySearch(boolean[] values, int fromIndex, int toIndex, boolean key) static intbinarySearch(byte[] values, int fromIndex, int toIndex, byte key) static intbinarySearch(char[] values, int fromIndex, int toIndex, char key) static intbinarySearch(double[] values, int fromIndex, int toIndex, double key) static intbinarySearch(float[] values, int fromIndex, int toIndex, float key) static intbinarySearch(int[] values, int fromIndex, int toIndex, int key) static intbinarySearch(long[] values, int fromIndex, int toIndex, long key) static intbinarySearch(short[] values, int fromIndex, int toIndex, short key) static intcompare(boolean val1, boolean val2) static intcompare(double val1, double val2) static intcompare(float val1, float val2) static intcompare(int val1, int val2) static intcompare(long val1, long val2) static voidsort(boolean[] values, int fromIndex, int toIndex) static voidsort(byte[] values, int fromIndex, int toIndex) static voidsort(char[] values, int fromIndex, int toIndex) static voidsort(double[] values, int fromIndex, int toIndex) static voidsort(float[] values, int fromIndex, int toIndex) static voidsort(int[] values, int fromIndex, int toIndex) static voidsort(long[] values, int fromIndex, int toIndex) static voidsort(short[] values, int fromIndex, int toIndex)
-
Constructor Details
-
ArraysHelper
public ArraysHelper()
-
-
Method Details
-
compare
public static int compare(int val1, int val2) -
compare
public static int compare(long val1, long val2) -
compare
public static int compare(double val1, double val2) -
compare
public static int compare(float val1, float val2) -
compare
public static int compare(boolean val1, boolean val2) -
sort
public static void sort(int[] values, int fromIndex, int toIndex) -
sort
public static void sort(long[] values, int fromIndex, int toIndex) -
sort
public static void sort(double[] values, int fromIndex, int toIndex) -
sort
public static void sort(float[] values, int fromIndex, int toIndex) -
sort
public static void sort(boolean[] values, int fromIndex, int toIndex) -
sort
public static void sort(byte[] values, int fromIndex, int toIndex) -
sort
public static void sort(char[] values, int fromIndex, int toIndex) -
sort
public static void sort(short[] values, int fromIndex, int toIndex) -
binarySearch
public static int binarySearch(int[] values, int fromIndex, int toIndex, int key) -
binarySearch
public static int binarySearch(long[] values, int fromIndex, int toIndex, long key) -
binarySearch
public static int binarySearch(double[] values, int fromIndex, int toIndex, double key) -
binarySearch
public static int binarySearch(float[] values, int fromIndex, int toIndex, float key) -
binarySearch
public static int binarySearch(boolean[] values, int fromIndex, int toIndex, boolean key) -
binarySearch
public static int binarySearch(byte[] values, int fromIndex, int toIndex, byte key) -
binarySearch
public static int binarySearch(char[] values, int fromIndex, int toIndex, char key) -
binarySearch
public static int binarySearch(short[] values, int fromIndex, int toIndex, short key)
-