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, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
public 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 List
get
in class AbstractList
public int element(int i)
public int[] elements()
public int size()
size
in interface Collection
size
in interface List
size
in class AbstractCollection
public int capacity()
public boolean equals(Object o)
equals
in interface Collection
equals
in interface List
equals
in class AbstractList
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public String toString()
toString
in class AbstractCollection
Copyright © 2020. All rights reserved.