public class IntsArray extends Object implements IntsModifiable
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(int v) |
void |
append(int[] vs) |
void |
append(int[] vs,
int from,
int to) |
void |
append(IntBuffer vs) |
void |
append(IntBuffer vs,
int c) |
void |
append(Ints vs) |
void |
append(Ints vs,
int from,
int to) |
void |
clear() |
void |
compact() |
int[] |
copyOf() |
int[] |
copyOf(int i,
int c) |
void |
copyTo(IntBuffer dest) |
void |
copyTo(int i,
int[] dest,
int iDest,
int c) |
void |
copyTo(int i,
IntBuffer dest,
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,
IntBuffer vs) |
void |
insert(int i,
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(IntBuffer vs) |
void |
prepend(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 |
removeIndex(int index)
Remove value at index.
|
void |
removeRange(int from,
int to)
Removes values starting at index from (inclusive) to index to (exclusive).
|
void |
set(int i,
int v) |
void |
set(int i,
int[] vs) |
void |
set(int i,
int[] vs,
int from,
int to) |
int |
v(int i)
Value at index i
|
public IntsArray(int[] a)
public IntsArray(int n)
public IntsArray()
public IntsArray(int[] a,
int n)
public IntsArray(Ints xs)
public int v(int i)
Intspublic int n()
Intspublic void copyTo(int i,
int[] dest,
int iDest,
int c)
public void set(int i,
int v)
set in interface IntsModifiablepublic void set(int i,
int[] vs)
set in interface IntsModifiablepublic void set(int i,
int[] vs,
int from,
int to)
set in interface IntsModifiablepublic void insert(int i,
int v)
insert in interface IntsModifiablepublic void insert(int i,
Ints vs)
insert in interface IntsModifiablepublic void insert(int i,
Ints vs,
int from,
int to)
insert in interface IntsModifiablepublic void insert(int i,
int[] vs)
insert in interface IntsModifiablepublic void insert(int i,
int[] vs,
int from,
int to)
insert in interface IntsModifiablepublic void insert(int i,
IntBuffer vs)
insert in interface IntsModifiablepublic void insert(int i,
IntBuffer vs,
int c)
insert in interface IntsModifiablepublic 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 IntsModifiablepublic void prepend(Ints vs)
prepend in interface IntsModifiablepublic void prepend(Ints vs, int from, int to)
prepend in interface IntsModifiablepublic void prepend(int[] vs)
prepend in interface IntsModifiablepublic void prepend(int[] vs,
int from,
int to)
prepend in interface IntsModifiablepublic void prepend(IntBuffer vs)
prepend in interface IntsModifiablepublic void prepend(IntBuffer vs, int c)
prepend in interface IntsModifiablepublic 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 IntsModifiablepublic void append(Ints vs)
append in interface IntsModifiablepublic void append(Ints vs, int from, int to)
append in interface IntsModifiablepublic void append(int[] vs)
append in interface IntsModifiablepublic void append(int[] vs,
int from,
int to)
append in interface IntsModifiablepublic void append(IntBuffer vs)
append in interface IntsModifiablepublic void append(IntBuffer vs, int c)
append in interface IntsModifiablepublic 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)
IntsModifiableremove in interface IntsModifiablepublic void removeRange(int from,
int to)
IntsModifiableremoveRange in interface IntsModifiablepublic void removeIndex(int index)
IntsModifiableremoveIndex in interface IntsModifiablepublic void clear()
clear in interface IntsModifiablepublic void ensureCapacity(int minCapacity)
ensureCapacity in interface IntsModifiablepublic void compact()
compact in interface IntsModifiablepublic static int[] newArray(int oldCapacity,
int minNewCapacity)
Copyright © 2020 Metron, Inc.. All rights reserved.