Package com.mchange.v1.util
Class ArrayUtils
- java.lang.Object
-
- com.mchange.v1.util.ArrayUtils
-
public final class ArrayUtils extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static int
hashArray(int[] ii)
returns a hash-code for an array consistent with Arrays.equals( ...static int
hashArray(java.lang.Object[] oo)
returns a hash-code for an array consistent with Arrays.equals( ...static int
hashOrZeroArray(int[] ii)
static int
hashOrZeroArray(java.lang.Object[] oo)
static int
identityIndexOf(java.lang.Object[] array, java.lang.Object o)
static int
indexOf(java.lang.Object[] array, java.lang.Object o)
The array may contain nulls, but o must be non-null.static boolean
startsWith(byte[] checkMe, byte[] maybePrefix)
static java.lang.String
stringifyContents(java.lang.Object[] array)
Deprecated.use the various toString(T[] methods)static java.lang.String
toString(boolean[] arr)
static java.lang.String
toString(byte[] arr)
static java.lang.String
toString(char[] arr)
static java.lang.String
toString(double[] arr)
static java.lang.String
toString(float[] arr)
static java.lang.String
toString(int[] arr)
static java.lang.String
toString(long[] arr)
static java.lang.String
toString(short[] arr)
static java.lang.String
toString(java.lang.Object[] arr)
-
-
-
Method Detail
-
indexOf
public static int indexOf(java.lang.Object[] array, java.lang.Object o)
The array may contain nulls, but o must be non-null.
-
identityIndexOf
public static int identityIndexOf(java.lang.Object[] array, java.lang.Object o)
-
startsWith
public static boolean startsWith(byte[] checkMe, byte[] maybePrefix)
-
hashArray
public static int hashArray(java.lang.Object[] oo)
returns a hash-code for an array consistent with Arrays.equals( ... )
-
hashArray
public static int hashArray(int[] ii)
returns a hash-code for an array consistent with Arrays.equals( ... )
-
hashOrZeroArray
public static int hashOrZeroArray(java.lang.Object[] oo)
-
hashOrZeroArray
public static int hashOrZeroArray(int[] ii)
-
stringifyContents
public static java.lang.String stringifyContents(java.lang.Object[] array)
Deprecated.use the various toString(T[] methods)
-
toString
public static java.lang.String toString(boolean[] arr)
-
toString
public static java.lang.String toString(byte[] arr)
-
toString
public static java.lang.String toString(char[] arr)
-
toString
public static java.lang.String toString(short[] arr)
-
toString
public static java.lang.String toString(int[] arr)
-
toString
public static java.lang.String toString(long[] arr)
-
toString
public static java.lang.String toString(float[] arr)
-
toString
public static java.lang.String toString(double[] arr)
-
toString
public static java.lang.String toString(java.lang.Object[] arr)
-
-