public final class IntVector extends Object implements Comparable<IntVector>, Cloneable
Modifier and Type | Field and Description |
---|---|
protected int[] |
data
the backing array.
|
static int |
defaultInitCap |
protected Growth |
growth
growth strategy.
|
protected int |
size
size as in a java.util.Vector.
|
Constructor and Description |
---|
IntVector() |
IntVector(Growth initGrowth) |
IntVector(Growth initGrowth,
int initCap) |
IntVector(int... init) |
IntVector(int initCap) |
Modifier and Type | Method and Description |
---|---|
void |
add(int x) |
void |
add(int x1,
int x2) |
void |
add(int x1,
int x2,
int x3) |
void |
add(long x) |
boolean |
addIfAbsent(int x) |
void |
addZeros(int length) |
void |
append(boolean[] a) |
void |
append(int[] a) |
void |
append(int[] x,
int pos,
int len) |
void |
append(IntVector x) |
void |
appendBits(long[] a) |
void |
appendPacked(boolean[] a) |
void |
appendPacked(byte[] a) |
void |
appendPacked(char[] a) |
void |
appendPacked(short[] a) |
void |
appendRawBits(double[] a) |
void |
appendRawBits(float[] a) |
void |
clear() |
IntVector |
clone() |
int |
compareTo(IntVector that)
dictionary/lexicographic ordering
|
boolean |
contains(int x) |
static void |
copy(int[] src,
int srcPos,
IntVector dst,
int dstPos,
int len) |
static void |
copy(IntVector src,
int srcPos,
int[] dst,
int dstPos,
int len) |
static void |
copy(IntVector src,
int srcPos,
IntVector dst,
int dstPos,
int len) |
int |
dumpTo(int[] dst,
int pos) |
void |
ensureCapacity(int desiredCap) |
void |
ensureSize(int sz) |
int |
get(int idx) |
int |
getFirstIndexOfValue(int x) |
boolean |
removeFirst(int x) |
void |
set(int idx,
int x) |
void |
setSize(int sz) |
int |
size() |
void |
squeeze() |
int[] |
toArray() |
int[] |
toArray(int[] dst) |
public static final int defaultInitCap
protected int size
protected int[] data
protected Growth growth
public IntVector(Growth initGrowth, int initCap)
public IntVector(int... init)
public IntVector(Growth initGrowth)
public IntVector(int initCap)
public IntVector()
public void add(int x)
public boolean addIfAbsent(int x)
public void add(long x)
public void add(int x1, int x2)
public void add(int x1, int x2, int x3)
public void addZeros(int length)
public void append(int[] a)
public void append(int[] x, int pos, int len)
public void append(boolean[] a)
public void appendPacked(boolean[] a)
public void appendPacked(byte[] a)
public void appendPacked(char[] a)
public void appendPacked(short[] a)
public void appendRawBits(float[] a)
public void appendBits(long[] a)
public void appendRawBits(double[] a)
public void append(IntVector x)
public boolean removeFirst(int x)
public int get(int idx)
public void set(int idx, int x)
public int getFirstIndexOfValue(int x)
public boolean contains(int x)
public int[] toArray(int[] dst)
public int dumpTo(int[] dst, int pos)
public void squeeze()
public void setSize(int sz)
public void clear()
public int size()
public int[] toArray()
public void ensureSize(int sz)
public void ensureCapacity(int desiredCap)
public static void copy(int[] src, int srcPos, IntVector dst, int dstPos, int len)
public static void copy(IntVector src, int srcPos, int[] dst, int dstPos, int len)
public int compareTo(IntVector that)
compareTo
in interface Comparable<IntVector>