public class CharVector extends Object implements Serializable
This work was authored by Carlos Villegas (cav@uniscope.co.jp).
Constructor and Description |
---|
CharVector()
Construct char vector instance with default block size.
|
CharVector(char[] a)
Construct char vector instance.
|
CharVector(char[] a, int capacity)
Construct char vector instance.
|
CharVector(CharVector cv)
Copy constructor
|
CharVector(int capacity)
Construct char vector instance.
|
Modifier and Type | Method and Description |
---|---|
int |
alloc(int size)
This is to implement memory allocation in the array.
|
int |
capacity()
Obtain capacity of array.
|
void |
clear()
Reset length of vector, but don't clear contents.
|
char |
get(int index)
Get char at index.
|
char[] |
getArray()
Obtain char vector array.
|
int |
length()
Obtain number of items in array.
|
void |
put(int index, char val)
Pet char at index.
|
void |
trimToSize()
Trim char vector to current length.
|
public CharVector()
public CharVector(int capacity)
capacity
- initial block size
public CharVector(char[] a)
a
- char array to use
public CharVector(char[] a, int capacity)
a
- char array to use
capacity
- initial block size
public CharVector(CharVector cv)
cv
- the CharVector that should be cloned
public void clear()
public char[] getArray()
public int length()
public int capacity()
public void put(int index, char val)
index
- the index
val
- a char
public char get(int index)
index
- the index
public int alloc(int size)
size
- to allocate
public void trimToSize()
Copyright © 1998–2023 iText Group NV. All rights reserved.