|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.dx.util.MutabilityControl
com.android.dx.util.FixedSizeList
com.android.dx.util.LabeledList
public class LabeledList
A list of labeled items, allowing easy lookup by label.
| Constructor Summary | |
|---|---|
LabeledList(int size)
|
|
LabeledList(LabeledList old)
Constructs a new instance that is a copy of the old instance. |
|
| Method Summary | |
|---|---|
int[] |
getLabelsInOrder()
Gets an array containing all of the labels used in this instance, in order. |
int |
getMaxLabel()
Gets the maximum label (exclusive) of any block added to this instance. |
int |
indexOfLabel(int label)
Gets the index of the first item in the list with the given label, if any. |
protected void |
set(int n,
LabeledItem item)
Sets the element at the given index. |
void |
shrinkToFit()
Shrinks this instance to fit, by removing any unset ( null) elements, leaving the remaining elements in
their original order. |
| 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 |
|---|
public LabeledList(int size)
public LabeledList(LabeledList old)
old - instance to copy| Method Detail |
|---|
public final int getMaxLabel()
>= 0; the maximum labelpublic final int indexOfLabel(int label)
label - >= 0; the label to look for
>= -1; the index of the so-labelled item, or -1
if none is foundpublic final int[] getLabelsInOrder()
non-null; ordered array of labels
NullPointerException - thrown if there are any null
items in this instancepublic void shrinkToFit()
FixedSizeListnull) elements, leaving the remaining elements in
their original order.
shrinkToFit in class FixedSizeList
protected void set(int n,
LabeledItem item)
n - >= 0, < size(); which elementitem - null-ok; the value to store
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||