public class CharVector extends Object implements Cloneable, Serializable
Modifier and Type | Field and Description |
---|---|
private char[] |
array
The encapsulated array
|
private int |
blockSize |
private static int |
DEFAULT_BLOCK_SIZE
Capacity increment size
|
private int |
n
Points to next free item
|
private static long |
serialVersionUID |
Constructor and Description |
---|
CharVector() |
CharVector(char[] a) |
CharVector(char[] a,
int capacity) |
CharVector(int capacity) |
Modifier and Type | Method and Description |
---|---|
int |
alloc(int size) |
int |
capacity()
returns current capacity of array
|
void |
clear()
Reset Vector but don't resize or clear elements
|
Object |
clone() |
char |
get(int index) |
char[] |
getArray() |
int |
length()
return number of items in array
|
void |
put(int index,
char val) |
void |
trimToSize() |
private static final long serialVersionUID
private static final int DEFAULT_BLOCK_SIZE
private int blockSize
private char[] array
private int n
public CharVector()
public CharVector(int capacity)
public CharVector(char[] a)
public CharVector(char[] a, int capacity)
public void clear()
public char[] getArray()
public int length()
public int capacity()
public void put(int index, char val)
public char get(int index)
public int alloc(int size)
public void trimToSize()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses