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