FileDocCategorySizeDatePackage
IntArray.javaAPI DocAndroid 5.1 API1641Thu Mar 12 22:22:42 GMT 2015com.android.gallery3d.util

IntArray

public class IntArray extends Object

Fields Summary
private static final int
INIT_CAPACITY
private int[]
mData
private int
mSize
Constructors Summary
Methods Summary
public voidadd(int value)


        
        if (mData.length == mSize) {
            int temp[] = new int[mSize + mSize];
            System.arraycopy(mData, 0, temp, 0, mSize);
            mData = temp;
        }
        mData[mSize++] = value;
    
public voidclear()

        mSize = 0;
        if (mData.length != INIT_CAPACITY) mData = new int[INIT_CAPACITY];
    
public int[]getInternalArray()

        return mData;
    
public intremoveLast()

        mSize--;
        return mData[mSize];
    
public intsize()

        return mSize;
    
public int[]toArray(int[] result)

        if (result == null || result.length < mSize) {
            result = new int[mSize];
        }
        System.arraycopy(mData, 0, result, 0, mSize);
        return result;