public final class IntArrayList extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static interface |
IntArrayList.IntComparator |
| Constructor and Description |
|---|
IntArrayList() |
IntArrayList(int... data) |
IntArrayList(int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int num) |
void |
add(int[] src,
int fromIndex,
int length)
Copies an array from the specified source array, beginning at the specified position.
|
void |
add(int position,
int num) |
void |
addAll(int[] arr) |
void |
addAll(IntArrayList intArrayList) |
void |
clear() |
IntArrayList |
clone() |
boolean |
contains(int value) |
void |
copyFrom(IntArrayList other) |
void |
ensureCapacity(int minCapacity) |
boolean |
equals(Object obj) |
int |
get(int i) |
static int[] |
getArrayReference(IntArrayList list) |
int |
hashCode() |
int |
indexOf(int value) |
boolean |
isEmpty() |
int |
last() |
int |
peek()
Return last element leaving it in stack.
|
int |
pop()
Removes the object at the top of this stack and returns that object as the value of this function.
|
void |
push(int value)
Alias for addAll(int) method.
|
boolean |
replaceAll(int from,
int to) |
boolean |
replaceFirst(int from,
int to) |
void |
reverse() |
void |
reverse(int from,
int to) |
void |
set(int position,
int num) |
int |
size() |
void |
sort() |
void |
stableSort(IntArrayList.IntComparator comparator) |
int[] |
toArray() |
String |
toString() |
public IntArrayList()
public IntArrayList(int initialCapacity)
public IntArrayList(int... data)
public void clear()
public void ensureCapacity(int minCapacity)
public void add(int num)
public void add(int position,
int num)
public void addAll(int[] arr)
public void addAll(IntArrayList intArrayList)
public void set(int position,
int num)
public void copyFrom(IntArrayList other)
public void sort()
public void stableSort(IntArrayList.IntComparator comparator)
public void push(int value)
value - public int peek()
public int pop()
public void add(int[] src,
int fromIndex,
int length)
src - - the source array.fromIndex - - starting position in the source array.length - - the number of array elements to be copied.public void reverse()
public void reverse(int from,
int to)
public int get(int i)
public boolean replaceFirst(int from,
int to)
public boolean replaceAll(int from,
int to)
public int last()
public int[] toArray()
public int size()
public boolean contains(int value)
public int indexOf(int value)
public boolean isEmpty()
public IntArrayList clone()
public static int[] getArrayReference(IntArrayList list)
Copyright © 2018. All rights reserved.