public class IntArrayList extends AbstractList implements Cloneable
| Modifier and Type | Field and Description |
|---|---|
protected int[] |
elements |
protected int |
n |
modCount| Constructor and Description |
|---|
IntArrayList() |
IntArrayList(int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(int o) |
int |
capacity() |
Object |
clone() |
boolean |
contains(int v) |
int |
element(int i) |
int[] |
elements() |
void |
ensureCapacity(int newCapacity) |
boolean |
equals(Object o) |
Object |
get(int i) |
protected void |
grow() |
int |
set(int i,
int newValue)
Set the ith element.
|
void |
setSize(int newSize) |
int |
size() |
String |
toString() |
add, add, addAll, clear, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArraypublic IntArrayList()
public IntArrayList(int initialCapacity)
public int set(int i,
int newValue)
public boolean add(int o)
public void setSize(int newSize)
protected void grow()
public boolean contains(int v)
public void ensureCapacity(int newCapacity)
public Object get(int i)
get in interface Listget in class AbstractListpublic int element(int i)
public int[] elements()
public int size()
size in interface Collectionsize in interface Listsize in class AbstractCollectionpublic int capacity()
public boolean equals(Object o)
equals in interface Collectionequals in interface Listequals in class AbstractListpublic Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic String toString()
toString in class AbstractCollectionCopyright © 2015. All Rights Reserved.