public final class IntArray extends Object
ArrayList<Integer>
and Vector<Integer>
,
but instead of Integer
it uses the primitive data type int
to store the integer values.Constructor and Description |
---|
IntArray() |
IntArray(int initialCapacity) |
IntArray(int[] a2) |
Modifier and Type | Method and Description |
---|---|
void |
add(int element) |
void |
addAll(int[] a2) |
void |
clear() |
void |
ensureCapacity(int minCapacity) |
boolean |
equals(Object o) |
int |
get(int index) |
int |
hashCode() |
static IntArray |
parse(String s) |
static IntArray |
parseOrNull(String s)
Same as parse(), but returns null if the array would be empty.
|
void |
set(int index,
int element) |
void |
setSize(int newSize) |
int |
size() |
int[] |
toArray() |
String |
toString() |
String |
toString(String delimiter) |
static IntArray |
unpack(byte[] b,
int p0,
int bitsPerEntry,
int n)
Bitwise unpacks an integer array from a byte array.
|
public IntArray()
public IntArray(int initialCapacity)
public IntArray(int[] a2)
public void clear()
public int size()
public void setSize(int newSize)
public void add(int element)
public void addAll(int[] a2)
public void set(int index, int element)
public int get(int index)
public void ensureCapacity(int minCapacity)
public int[] toArray()
public static IntArray parseOrNull(String s)
public static IntArray unpack(byte[] b, int p0, int bitsPerEntry, int n)