com.android.dx.cf.code
Class ByteBlockList

java.lang.Object
  extended by com.android.dx.util.MutabilityControl
      extended by com.android.dx.util.FixedSizeList
          extended by com.android.dx.util.LabeledList
              extended by com.android.dx.cf.code.ByteBlockList
All Implemented Interfaces:
ToHuman

public final class ByteBlockList
extends LabeledList

List of ByteBlock instances.


Constructor Summary
ByteBlockList(int size)
          Constructs an instance.
 
Method Summary
 ByteBlock get(int n)
          Gets the indicated element.
 ByteBlock labelToBlock(int label)
          Gets the block with the given label.
 void set(int n, ByteBlock bb)
          Sets the element at the given index.
 
Methods inherited from class com.android.dx.util.LabeledList
getLabelsInOrder, getMaxLabel, indexOfLabel, set, shrinkToFit
 
Methods inherited from class com.android.dx.util.FixedSizeList
equals, get0, getOrNull0, hashCode, set0, size, toHuman, toHuman, toString, toString
 
Methods inherited from class com.android.dx.util.MutabilityControl
isImmutable, isMutable, setImmutable, throwIfImmutable, throwIfMutable
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ByteBlockList

public ByteBlockList(int size)
Constructs an instance.

Parameters:
size - >= 0; the number of elements to be in the list
Method Detail

get

public ByteBlock get(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.

Parameters:
n - >= 0, < size(); which element
Returns:
non-null; the indicated element

labelToBlock

public ByteBlock labelToBlock(int label)
Gets the block with the given label.

Parameters:
label - the label to look for
Returns:
non-null; the block with the given label

set

public void set(int n,
                ByteBlock bb)
Sets the element at the given index.

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


Copyright © 2015. All rights reserved.