|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.util.TokenList
public final class TokenList
This is a simple container for tokens (byte arrays).
Field Summary | |
---|---|
byte[][] |
list
Value array. |
Constructor Summary | |
---|---|
TokenList()
Default constructor. |
|
TokenList(double f)
Constructor. |
|
TokenList(int is)
Constructor. |
Method Summary | |
---|---|
void |
add(byte[] v)
Adds next value. |
void |
add(int v)
Adds next value. |
void |
add(String v)
Adds next value. |
boolean |
contains(byte[] v)
Checks if the specified token is found in the list. |
byte[][] |
finish()
Finishes the array. |
String[] |
finishString()
Finishes the list as string array. |
byte[] |
get(int p)
Returns the specified value. |
Iterator<byte[]> |
iterator()
|
void |
reset()
Resets the integer list. |
void |
set(byte[] v,
int p)
Sets the specified value at the specified position. |
int |
size()
Returns the number of entries. |
void |
size(int s)
Sets the number of entries. |
void |
sort(boolean cs)
Sorts the strings. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public byte[][] list
Constructor Detail |
---|
public TokenList()
public TokenList(int is)
is
- initial size of the listpublic TokenList(double f)
f
- resize factorMethod Detail |
---|
public void add(byte[] v)
v
- value to be addedpublic void add(int v)
v
- value to be addedpublic void add(String v)
v
- value to be addedpublic int size()
public void size(int s)
s
- number of entriespublic byte[] get(int p)
p
- position
public void set(byte[] v, int p)
v
- valuep
- positionpublic boolean contains(byte[] v)
v
- token to be checked
public byte[][] finish()
public String[] finishString()
public void reset()
public void sort(boolean cs)
cs
- respect case sensitivitypublic Iterator<byte[]> iterator()
iterator
in interface Iterable<byte[]>
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |