Package org.hibernate.util
Class ArrayHelper
java.lang.Object
org.hibernate.util.ArrayHelper
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddAll(Collection collection, Object[] array) static intcountTrue(boolean[] array) static int[]fillArray(int value, int length) static String[]static LockMode[]static LockOptions[]fillArray(LockOptions lockOptions, int length) static int[]getBatchSizes(int maxBatchSize) static inthash(byte[] bytes) calculate the array hash (only the first level)static inthash(char[] array) calculate the array hash (only the first level)static intcalculate the array hash (only the first level)static intstatic booleanisAllFalse(boolean[] array) static booleanisAllNegative(int[] array) static booleanisAllTrue(boolean[] array) static booleanisEquals(byte[] b1, byte[] b2) Compare 2 arrays only at the first levelstatic booleanisEquals(char[] o1, char[] o2) Compare 2 arrays only at the first levelstatic booleanCompare 2 arrays only at the first levelstatic int[]join(int[] x, int[] y) static String[]static String[]static Object[]static String[]static int[][]to2DIntArray(Collection coll) static String[][]to2DStringArray(Collection coll) static boolean[]toBooleanArray(Collection coll) static int[]toIntArray(Collection coll) static Liststatic Liststatic Stringstatic String[]toStringArray(Object[] objects) static String[]toStringArray(Collection coll) static Type[]toTypeArray(Collection coll) static Object[]
-
Field Details
-
TRUE
public static final boolean[] TRUE -
FALSE
public static final boolean[] FALSE -
EMPTY_STRING_ARRAY
-
EMPTY_INT_ARRAY
public static final int[] EMPTY_INT_ARRAY -
EMPTY_BOOLEAN_ARRAY
public static final boolean[] EMPTY_BOOLEAN_ARRAY -
EMPTY_CLASS_ARRAY
-
EMPTY_OBJECT_ARRAY
-
EMPTY_TYPE_ARRAY
-
-
Method Details
-
indexOf
-
toStringArray
-
fillArray
-
fillArray
public static int[] fillArray(int value, int length) -
fillArray
-
fillArray
-
toStringArray
-
to2DStringArray
-
to2DIntArray
-
toTypeArray
-
toIntArray
-
toBooleanArray
-
typecast
-
toList
-
slice
-
slice
-
toList
-
join
-
join
-
join
public static int[] join(int[] x, int[] y) -
toString
-
isAllNegative
public static boolean isAllNegative(int[] array) -
isAllTrue
public static boolean isAllTrue(boolean[] array) -
countTrue
public static int countTrue(boolean[] array) -
isAllFalse
public static boolean isAllFalse(boolean[] array) -
addAll
-
getBatchSizes
public static int[] getBatchSizes(int maxBatchSize) -
hash
calculate the array hash (only the first level) -
hash
public static int hash(char[] array) calculate the array hash (only the first level) -
hash
public static int hash(byte[] bytes) calculate the array hash (only the first level) -
isEquals
Compare 2 arrays only at the first level -
isEquals
public static boolean isEquals(char[] o1, char[] o2) Compare 2 arrays only at the first level -
isEquals
public static boolean isEquals(byte[] b1, byte[] b2) Compare 2 arrays only at the first level
-