org.apache.hadoop.hbase.util
Class ArrayUtils
java.lang.Object
org.apache.hadoop.hbase.util.ArrayUtils
@InterfaceAudience.Private
public class ArrayUtils
- extends Object
A set of array utility functions that return reasonable values in cases where an array is
allocated or if it is null
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArrayUtils
public ArrayUtils()
length
public static int length(byte[] a)
length
public static int length(long[] a)
length
public static int length(Object[] a)
isEmpty
public static boolean isEmpty(byte[] a)
isEmpty
public static boolean isEmpty(long[] a)
isEmpty
public static boolean isEmpty(Object[] a)
getFirst
public static long getFirst(long[] a)
getLast
public static long getLast(long[] a)
getTotalLengthOfArrays
public static int getTotalLengthOfArrays(Iterable<byte[]> arrays)
toList
public static ArrayList<Long> toList(long[] array)
growIfNecessary
public static byte[] growIfNecessary(byte[] array,
int minLength,
int numAdditionalBytes)
growIfNecessary
public static int[] growIfNecessary(int[] array,
int minLength,
int numAdditionalInts)
growIfNecessary
public static long[] growIfNecessary(long[] array,
int minLength,
int numAdditionalLongs)
Copyright © 2015 The Apache Software Foundation. All Rights Reserved.