FileDocCategorySizeDatePackage
ByteBlockList.javaAPI DocAndroid 1.5 API2117Wed May 06 22:41:02 BST 2009com.android.dx.cf.code

ByteBlockList

public final class ByteBlockList extends com.android.dx.util.LabeledList
List of {@link ByteBlock} instances.

Fields Summary
Constructors Summary
public ByteBlockList(int size)
Constructs an instance.

param
size >= 0; the number of elements to be in the list

        super(size);
    
Methods Summary
public ByteBlockget(int n)
Gets the indicated element. It is an error to call this with the index for an element which was never set; if you do that, this will throw NullPointerException.

param
n >= 0, < size(); which element
return
non-null; the indicated element

        return (ByteBlock) get0(n);
    
public ByteBlocklabelToBlock(int label)
Gets the block with the given label.

param
label the label to look for
return
non-null; the block with the given label

        int idx = indexOfLabel(label);

        if (idx < 0) {
            throw new IllegalArgumentException("no such label: "
                    + Hex.u2(label));
        }

        return get(idx);
    
public voidset(int n, ByteBlock bb)
Sets the element at the given index.

param
n >= 0, < size(); which element
param
bb null-ok; the value to store

        super.set(n, bb);