com.android.dx.rop.cst
Class CstArray.List

java.lang.Object
  extended by com.android.dx.util.MutabilityControl
      extended by com.android.dx.util.FixedSizeList
          extended by com.android.dx.rop.cst.CstArray.List
All Implemented Interfaces:
ToHuman, Comparable<CstArray.List>
Enclosing class:
CstArray

public static final class CstArray.List
extends FixedSizeList
implements Comparable<CstArray.List>

List of Constant instances.


Constructor Summary
CstArray.List(int size)
          Constructs an instance.
 
Method Summary
 int compareTo(CstArray.List other)
          
 Constant get(int n)
          Gets the element at the given index.
 void set(int n, Constant a)
          Sets the element at the given index.
 
Methods inherited from class com.android.dx.util.FixedSizeList
equals, get0, getOrNull0, hashCode, set0, shrinkToFit, 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

CstArray.List

public CstArray.List(int size)
Constructs an instance. All indices initially contain null.

Parameters:
size - the size of the list
Method Detail

compareTo

public int compareTo(CstArray.List other)

Specified by:
compareTo in interface Comparable<CstArray.List>

get

public Constant get(int n)
Gets the element at the given index. 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 index
Returns:
non-null; element at that index

set

public void set(int n,
                Constant a)
Sets the element at the given index.

Parameters:
n - >= 0, < size(); which index
a - null-ok; the element to set at n


Copyright © 2015. All rights reserved.