org.apache.hadoop.hbase.util
Class ArrayUtils

java.lang.Object
  extended by 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


Constructor Summary
ArrayUtils()
           
 
Method Summary
static long getFirst(long[] a)
           
static long getLast(long[] a)
           
static int getTotalLengthOfArrays(Iterable<byte[]> arrays)
           
static byte[] growIfNecessary(byte[] array, int minLength, int numAdditionalBytes)
           
static int[] growIfNecessary(int[] array, int minLength, int numAdditionalInts)
           
static long[] growIfNecessary(long[] array, int minLength, int numAdditionalLongs)
           
static boolean isEmpty(byte[] a)
           
static boolean isEmpty(long[] a)
           
static boolean isEmpty(Object[] a)
           
static int length(byte[] a)
           
static int length(long[] a)
           
static int length(Object[] a)
           
static ArrayList<Long> toList(long[] array)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayUtils

public ArrayUtils()
Method Detail

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.