English | Site Directory

Android - An Open Handset Alliance Project

android.util
public class

android.util.ArrayUtils

java.lang.Object
android.util.ArrayUtils

ArrayUtils contains some methods that you can call to find out the most efficient increments by which to grow arrays.

Summary

Public Methods

      static  T[]  emptyArray(Class kind)
Returns an empty array of the specified type.
      static  boolean  equals(byte[] array1, byte[] array2, int length)
Checks if the beginnings of two byte arrays are equal.
      static  int  idealBooleanArraySize(int need)
      static  int  idealByteArraySize(int need)
      static  int  idealCharArraySize(int need)
      static  int  idealFloatArraySize(int need)
      static  int  idealIntArraySize(int need)
      static  int  idealLongArraySize(int need)
      static  int  idealObjectArraySize(int need)
      static  int  idealShortArraySize(int need)
Methods inherited from class java.lang.Object

Details

Public Methods

public static T[] emptyArray(Class kind)

Returns an empty array of the specified type. The intent is that it will return the same empty array every time to avoid reallocation, although this is not guaranteed.

public static boolean equals(byte[] array1, byte[] array2, int length)

Checks if the beginnings of two byte arrays are equal.

Parameters

array1 the first byte array
array2 the second byte array
length the number of bytes to check

Returns

  • true if they're equal, false otherwise

public static int idealBooleanArraySize(int need)

public static int idealByteArraySize(int need)

public static int idealCharArraySize(int need)

public static int idealFloatArraySize(int need)

public static int idealIntArraySize(int need)

public static int idealLongArraySize(int need)

public static int idealObjectArraySize(int need)

public static int idealShortArraySize(int need)

Build m5-rc15i - 10 Jun 2008 13:54