FileDocCategorySizeDatePackage
ByteBlockList.javaAPI DocAndroid 5.1 API2103Thu Mar 12 22:18:30 GMT 2015com.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 {@code >= 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 {@code NullPointerException}.

param
n {@code >= 0, < size();} which element
return
{@code 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
{@code 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 {@code >= 0, < size();} which element
param
bb {@code null-ok;} the value to store

        super.set(n, bb);