|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metsci.glimpse.util.primitives.IntsArray
public class IntsArray
Field Summary | |
---|---|
int[] |
a
|
int |
n
|
Constructor Summary | |
---|---|
IntsArray()
|
|
IntsArray(int n)
|
|
IntsArray(int[] a)
For efficiency, does not clone the array arg. |
|
IntsArray(int[] a,
int n)
For efficiency, does not clone the array arg. |
|
IntsArray(Ints xs)
Clones the sequence arg. |
Method Summary | |
---|---|
void |
append(int v)
|
void |
append(int[] vs)
|
void |
append(int[] vs,
int from,
int to)
|
void |
append(java.nio.IntBuffer vs)
|
void |
append(java.nio.IntBuffer vs,
int c)
|
void |
append(Ints vs)
|
void |
append(Ints vs,
int from,
int to)
|
void |
compact()
|
int[] |
copyOf()
|
int[] |
copyOf(int i,
int c)
|
void |
copyTo(int i,
int[] dest,
int iDest,
int c)
|
void |
ensureCapacity(int minCapacity)
|
int |
first()
|
void |
insert(int i,
int v)
|
void |
insert(int i,
int[] vs)
|
void |
insert(int i,
int[] vs,
int from,
int to)
|
void |
insert(int i,
java.nio.IntBuffer vs)
|
void |
insert(int i,
java.nio.IntBuffer vs,
int c)
|
void |
insert(int i,
Ints vs)
|
void |
insert(int i,
Ints vs,
int from,
int to)
|
boolean |
isEmpty()
|
int |
last()
|
int |
n()
Length of the sequence |
static int[] |
newArray(int oldCapacity,
int minNewCapacity)
Creates a new array whose capacity is at least minNewCapacity, and at least 1.618 * oldCapacity, up to Integer.MAX_VALUE. |
void |
prepend(int v)
|
void |
prepend(int[] vs)
|
void |
prepend(int[] vs,
int from,
int to)
|
void |
prepend(java.nio.IntBuffer vs)
|
void |
prepend(java.nio.IntBuffer vs,
int c)
|
void |
prepend(Ints vs)
|
void |
prepend(Ints vs,
int from,
int to)
|
void |
prepForAppend(int c)
Makes room in this array for new values to be appended. |
void |
prepForInsert(int i,
int c)
Makes room in this array for new values to be inserted. |
void |
prepForPrepend(int c)
Makes room in this array for new values to be prepended. |
void |
remove(int v)
Removes a single copy of the specified value. |
void |
set(int i,
int v)
|
int |
v(int i)
Value at index i |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int[] a
public int n
Constructor Detail |
---|
public IntsArray(int[] a)
public IntsArray(int n)
public IntsArray()
public IntsArray(int[] a, int n)
public IntsArray(Ints xs)
Method Detail |
---|
public int v(int i)
Ints
v
in interface Ints
public int n()
Ints
n
in interface Ints
public void copyTo(int i, int[] dest, int iDest, int c)
copyTo
in interface Ints
public int[] copyOf(int i, int c)
copyOf
in interface Ints
public int[] copyOf()
copyOf
in interface Ints
public boolean isEmpty()
isEmpty
in interface Ints
public int first()
first
in interface Ints
public int last()
last
in interface Ints
public void set(int i, int v)
set
in interface IntsModifiable
public void insert(int i, int v)
insert
in interface IntsModifiable
public void insert(int i, Ints vs)
insert
in interface IntsModifiable
public void insert(int i, Ints vs, int from, int to)
insert
in interface IntsModifiable
public void insert(int i, int[] vs)
insert
in interface IntsModifiable
public void insert(int i, int[] vs, int from, int to)
insert
in interface IntsModifiable
public void insert(int i, java.nio.IntBuffer vs)
insert
in interface IntsModifiable
public void insert(int i, java.nio.IntBuffer vs, int c)
insert
in interface IntsModifiable
public void prepForInsert(int i, int c)
this.a
on [i,i+c)
are undefined. Writing meaningful values to these indices is up to the
caller.
i
- The index at which new values will be insertedc
- The count of new values that will be insertedpublic void prepend(int v)
prepend
in interface IntsModifiable
public void prepend(Ints vs)
prepend
in interface IntsModifiable
public void prepend(Ints vs, int from, int to)
prepend
in interface IntsModifiable
public void prepend(int[] vs)
prepend
in interface IntsModifiable
public void prepend(int[] vs, int from, int to)
prepend
in interface IntsModifiable
public void prepend(java.nio.IntBuffer vs)
prepend
in interface IntsModifiable
public void prepend(java.nio.IntBuffer vs, int c)
prepend
in interface IntsModifiable
public void prepForPrepend(int c)
this.a
on [0,c)
are undefined. Writing meaningful values to these indices is up to the
caller.
c
- The count of new values that will be insertedpublic void append(int v)
append
in interface IntsModifiable
public void append(Ints vs)
append
in interface IntsModifiable
public void append(Ints vs, int from, int to)
append
in interface IntsModifiable
public void append(int[] vs)
append
in interface IntsModifiable
public void append(int[] vs, int from, int to)
append
in interface IntsModifiable
public void append(java.nio.IntBuffer vs)
append
in interface IntsModifiable
public void append(java.nio.IntBuffer vs, int c)
append
in interface IntsModifiable
public void prepForAppend(int c)
this.a
on [this.n-c,this.n)
are undefined. Writing meaningful values to these indices is up to the
caller.
c
- The count of new values that will be appendedpublic void remove(int v)
IntsModifiable
remove
in interface IntsModifiable
public void ensureCapacity(int minCapacity)
ensureCapacity
in interface IntsModifiable
public void compact()
compact
in interface IntsModifiable
public static int[] newArray(int oldCapacity, int minNewCapacity)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |