/** * <p>Checks if an array of primitive bytes is empty or {@code null}. * * @param array the array to test * @return {@code true} if the array is empty or {@code null} * @since 2.1 */ public static boolean isEmpty(final byte[] array) { return getLength(array) == 0; }
/** * <p>Checks if an array of primitive doubles is empty or {@code null}. * * @param array the array to test * @return {@code true} if the array is empty or {@code null} * @since 2.1 */ public static boolean isEmpty(final double[] array) { return getLength(array) == 0; }
/** * <p>Checks whether two arrays are the same length, treating * {@code null} arrays as length {@code 0}. * * @param array1 the first array, may be {@code null} * @param array2 the second array, may be {@code null} * @return {@code true} if length of arrays matches, treating * {@code null} as an empty array */ public static boolean isSameLength(final char[] array1, final char[] array2) { return getLength(array1) == getLength(array2); }
/** * <p>Checks whether two arrays are the same length, treating * {@code null} arrays as length {@code 0}. * * @param array1 the first array, may be {@code null} * @param array2 the second array, may be {@code null} * @return {@code true} if length of arrays matches, treating * {@code null} as an empty array */ public static boolean isSameLength(final float[] array1, final float[] array2) { return getLength(array1) == getLength(array2); }
/** * <p>Checks if an array of Objects is empty or {@code null}. * * @param array the array to test * @return {@code true} if the array is empty or {@code null} * @since 2.1 */ public static boolean isEmpty(final Object[] array) { return getLength(array) == 0; }
/** * <p>Checks whether two arrays are the same length, treating * {@code null} arrays as length {@code 0}. * * @param array1 the first array, may be {@code null} * @param array2 the second array, may be {@code null} * @return {@code true} if length of arrays matches, treating * {@code null} as an empty array */ public static boolean isSameLength(final int[] array1, final int[] array2) { return getLength(array1) == getLength(array2); }
/** * <p>Checks whether two arrays are the same length, treating * {@code null} arrays as length {@code 0}. * * @param array1 the first array, may be {@code null} * @param array2 the second array, may be {@code null} * @return {@code true} if length of arrays matches, treating * {@code null} as an empty array */ public static boolean isSameLength(final short[] array1, final short[] array2) { return getLength(array1) == getLength(array2); }
/** * <p>Checks whether two arrays are the same length, treating * {@code null} arrays as length {@code 0}. * * @param array1 the first array, may be {@code null} * @param array2 the second array, may be {@code null} * @return {@code true} if length of arrays matches, treating * {@code null} as an empty array */ public static boolean isSameLength(final byte[] array1, final byte[] array2) { return getLength(array1) == getLength(array2); }
/** * <p>Checks whether two arrays are the same length, treating * {@code null} arrays as length {@code 0}. * * @param array1 the first array, may be {@code null} * @param array2 the second array, may be {@code null} * @return {@code true} if length of arrays matches, treating * {@code null} as an empty array */ public static boolean isSameLength(final double[] array1, final double[] array2) { return getLength(array1) == getLength(array2); }
/** * <p>Checks whether two arrays are the same length, treating * {@code null} arrays as length {@code 0}. * * @param array1 the first array, may be {@code null} * @param array2 the second array, may be {@code null} * @return {@code true} if length of arrays matches, treating * {@code null} as an empty array */ public static boolean isSameLength(final boolean[] array1, final boolean[] array2) { return getLength(array1) == getLength(array2); }
/** * <p>Checks if an array of primitive floats is empty or {@code null}. * * @param array the array to test * @return {@code true} if the array is empty or {@code null} * @since 2.1 */ public static boolean isEmpty(final float[] array) { return getLength(array) == 0; }
/** * <p>Checks if an array of primitive ints is empty or {@code null}. * * @param array the array to test * @return {@code true} if the array is empty or {@code null} * @since 2.1 */ public static boolean isEmpty(final int[] array) { return getLength(array) == 0; }
/** * <p>Checks if an array of primitive shorts is empty or {@code null}. * * @param array the array to test * @return {@code true} if the array is empty or {@code null} * @since 2.1 */ public static boolean isEmpty(final short[] array) { return getLength(array) == 0; }
/** * <p>Checks if an array of primitive chars is empty or {@code null}. * * @param array the array to test * @return {@code true} if the array is empty or {@code null} * @since 2.1 */ public static boolean isEmpty(final char[] array) { return getLength(array) == 0; }
/** * <p>Checks if an array of primitive booleans is empty or {@code null}. * * @param array the array to test * @return {@code true} if the array is empty or {@code null} * @since 2.1 */ public static boolean isEmpty(final boolean[] array) { return getLength(array) == 0; }
/** * <p>Checks whether two arrays are the same length, treating * {@code null} arrays as length {@code 0}. * * @param array1 the first array, may be {@code null} * @param array2 the second array, may be {@code null} * @return {@code true} if length of arrays matches, treating * {@code null} as an empty array */ public static boolean isSameLength(final long[] array1, final long[] array2) { return getLength(array1) == getLength(array2); }
/** * <p>Checks if an array of primitive longs is empty or {@code null}. * * @param array the array to test * @return {@code true} if the array is empty or {@code null} * @since 2.1 */ public static boolean isEmpty(final long[] array) { return getLength(array) == 0; }
/** * <p>Checks whether two arrays are the same length, treating * {@code null} arrays as length {@code 0}. * * <p>Any multi-dimensional aspects of the arrays are ignored. * * @param array1 the first array, may be {@code null} * @param array2 the second array, may be {@code null} * @return {@code true} if length of arrays matches, treating * {@code null} as an empty array */ public static boolean isSameLength(final Object[] array1, final Object[] array2) { return getLength(array1) == getLength(array2); }
/** * Returns whether a given array can safely be accessed at the given index. * @param <T> the component type of the array * @param array the array to inspect, may be null * @param index the index of the array to be inspected * @return Whether the given index is safely-accessible in the given array * @since 3.8 */ public static <T> boolean isArrayIndexValid(T[] array, int index){ if(getLength(array) == 0 || array.length <= index){ return false; } return index >= 0; } }
public IndividualBytesFieldCell(byte[] row, byte[] family, byte[] qualifier, long timestamp, KeyValue.Type type, long seqId, byte[] value, byte[] tags) { this(row, 0, ArrayUtils.getLength(row), family, 0, ArrayUtils.getLength(family), qualifier, 0, ArrayUtils.getLength(qualifier), timestamp, type, seqId, value, 0, ArrayUtils.getLength(value), tags, 0, ArrayUtils.getLength(tags)); }