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