|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metsci.glimpse.util.primitives.LongsArray
public class LongsArray
Field Summary | |
---|---|
long[] |
a
|
int |
n
|
Constructor Summary | |
---|---|
LongsArray()
|
|
LongsArray(int n)
|
|
LongsArray(long[] a)
For efficiency, does not clone the array arg. |
|
LongsArray(long[] a,
int n)
For efficiency, does not clone the array arg. |
|
LongsArray(Longs xs)
Clones the sequence arg. |
Method Summary | |
---|---|
void |
append(long v)
|
void |
append(long[] vs)
|
void |
append(long[] vs,
int from,
int to)
|
void |
append(java.nio.LongBuffer vs)
|
void |
append(java.nio.LongBuffer vs,
int c)
|
void |
append(Longs vs)
|
void |
append(Longs vs,
int from,
int to)
|
void |
compact()
|
long[] |
copyOf()
|
long[] |
copyOf(int i,
int c)
|
void |
copyTo(int i,
long[] dest,
int iDest,
int c)
|
void |
ensureCapacity(int minCapacity)
|
long |
first()
|
void |
insert(int i,
long v)
|
void |
insert(int i,
long[] vs)
|
void |
insert(int i,
long[] vs,
int from,
int to)
|
void |
insert(int i,
java.nio.LongBuffer vs)
|
void |
insert(int i,
java.nio.LongBuffer vs,
int c)
|
void |
insert(int i,
Longs vs)
|
void |
insert(int i,
Longs vs,
int from,
int to)
|
boolean |
isEmpty()
|
long |
last()
|
int |
n()
Length of the sequence |
static long[] |
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(long v)
|
void |
prepend(long[] vs)
|
void |
prepend(long[] vs,
int from,
int to)
|
void |
prepend(java.nio.LongBuffer vs)
|
void |
prepend(java.nio.LongBuffer vs,
int c)
|
void |
prepend(Longs vs)
|
void |
prepend(Longs 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(long v)
Removes a single copy of the specified value. |
void |
set(int i,
long v)
|
long |
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 long[] a
public int n
Constructor Detail |
---|
public LongsArray(long[] a)
public LongsArray(int n)
public LongsArray()
public LongsArray(long[] a, int n)
public LongsArray(Longs xs)
Method Detail |
---|
public long v(int i)
Longs
v
in interface Longs
public int n()
Longs
n
in interface Longs
public void copyTo(int i, long[] dest, int iDest, int c)
copyTo
in interface Longs
public long[] copyOf(int i, int c)
copyOf
in interface Longs
public long[] copyOf()
copyOf
in interface Longs
public boolean isEmpty()
isEmpty
in interface Longs
public long first()
first
in interface Longs
public long last()
last
in interface Longs
public void set(int i, long v)
set
in interface LongsModifiable
public void insert(int i, long v)
insert
in interface LongsModifiable
public void insert(int i, Longs vs)
insert
in interface LongsModifiable
public void insert(int i, Longs vs, int from, int to)
insert
in interface LongsModifiable
public void insert(int i, long[] vs)
insert
in interface LongsModifiable
public void insert(int i, long[] vs, int from, int to)
insert
in interface LongsModifiable
public void insert(int i, java.nio.LongBuffer vs)
insert
in interface LongsModifiable
public void insert(int i, java.nio.LongBuffer vs, int c)
insert
in interface LongsModifiable
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(long v)
prepend
in interface LongsModifiable
public void prepend(Longs vs)
prepend
in interface LongsModifiable
public void prepend(Longs vs, int from, int to)
prepend
in interface LongsModifiable
public void prepend(long[] vs)
prepend
in interface LongsModifiable
public void prepend(long[] vs, int from, int to)
prepend
in interface LongsModifiable
public void prepend(java.nio.LongBuffer vs)
prepend
in interface LongsModifiable
public void prepend(java.nio.LongBuffer vs, int c)
prepend
in interface LongsModifiable
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(long v)
append
in interface LongsModifiable
public void append(Longs vs)
append
in interface LongsModifiable
public void append(Longs vs, int from, int to)
append
in interface LongsModifiable
public void append(long[] vs)
append
in interface LongsModifiable
public void append(long[] vs, int from, int to)
append
in interface LongsModifiable
public void append(java.nio.LongBuffer vs)
append
in interface LongsModifiable
public void append(java.nio.LongBuffer vs, int c)
append
in interface LongsModifiable
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(long v)
LongsModifiable
remove
in interface LongsModifiable
public void ensureCapacity(int minCapacity)
ensureCapacity
in interface LongsModifiable
public void compact()
compact
in interface LongsModifiable
public static long[] newArray(int oldCapacity, int minNewCapacity)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |