Class ArraysHelper

java.lang.Object
org.magicwerk.brownies.collections.helper.ArraysHelper

public class ArraysHelper extends Object
The class ArraysHelper adds method for handling boolean arrays which are missing in java.util.Arrays, e.g. sort() and binarySearch().
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    binarySearch(boolean[] values, int fromIndex, int toIndex, boolean key)
     
    static int
    binarySearch(byte[] values, int fromIndex, int toIndex, byte key)
     
    static int
    binarySearch(char[] values, int fromIndex, int toIndex, char key)
     
    static int
    binarySearch(double[] values, int fromIndex, int toIndex, double key)
     
    static int
    binarySearch(float[] values, int fromIndex, int toIndex, float key)
     
    static int
    binarySearch(int[] values, int fromIndex, int toIndex, int key)
     
    static int
    binarySearch(long[] values, int fromIndex, int toIndex, long key)
     
    static int
    binarySearch(short[] values, int fromIndex, int toIndex, short key)
     
    static int
    compare(boolean val1, boolean val2)
     
    static int
    compare(double val1, double val2)
     
    static int
    compare(float val1, float val2)
     
    static int
    compare(int val1, int val2)
     
    static int
    compare(long val1, long val2)
     
    static void
    sort(boolean[] values, int fromIndex, int toIndex)
     
    static void
    sort(byte[] values, int fromIndex, int toIndex)
     
    static void
    sort(char[] values, int fromIndex, int toIndex)
     
    static void
    sort(double[] values, int fromIndex, int toIndex)
     
    static void
    sort(float[] values, int fromIndex, int toIndex)
     
    static void
    sort(int[] values, int fromIndex, int toIndex)
     
    static void
    sort(long[] values, int fromIndex, int toIndex)
     
    static void
    sort(short[] values, int fromIndex, int toIndex)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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)