|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.fop.hyphenation.CharVector
public class CharVector
This class implements a simple char vector with access to the underlying array.
This work was authored by Carlos Villegas (cav@uniscope.co.jp).
| Constructor Summary | |
|---|---|
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(int capacity)
Construct char vector instance. |
|
| Method Summary | |
|---|---|
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. |
java.lang.Object |
clone()
|
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CharVector()
public CharVector(int capacity)
capacity - initial block sizepublic CharVector(char[] a)
a - char array to use
public CharVector(char[] a,
int capacity)
a - char array to usecapacity - initial block size| Method Detail |
|---|
public void clear()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic char[] getArray()
public int length()
public int capacity()
public void put(int index,
char val)
index - the indexval - a charpublic char get(int index)
index - the index
public int alloc(int size)
size - to allocate
public void trimToSize()
|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||