|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.util.IntList
public final class IntList
This is a simple container for native int values.
Field Summary | |
---|---|
int[] |
list
Value array. |
int |
size
Current array size. |
Constructor Summary | |
---|---|
IntList()
Default constructor. |
|
IntList(int is)
Constructor, specifying an initial list size. |
|
IntList(int[] v)
Constructor, specifying an initial array. |
Method Summary | |
---|---|
void |
add(int v)
Adds next value. |
boolean |
contains(int v)
Checks if the specified value is found in the list. |
static IntList |
createOrder(byte[][] tok,
boolean num,
boolean asc)
Sorts the specified tokens and returns an IntList instance
with the sort order of all tokens. |
int[] |
finish()
Finishes the int array. |
void |
remove(int i)
Remove a value. |
void |
reset()
Resets the integer list. |
void |
set(int v,
int p)
Sets a value at the specified position. |
void |
sort()
Sorts the int values. |
void |
sort(byte[][] tok,
boolean num,
boolean asc)
Sorts the array in the order of the specified token array. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int[] list
public int size
Constructor Detail |
---|
public IntList()
public IntList(int is)
is
- initial size of the listpublic IntList(int[] v)
v
- initial list valuesMethod Detail |
---|
public void add(int v)
v
- value to be addedpublic void remove(int i)
i
- index of the value to be removepublic void set(int v, int p)
v
- value to be addedp
- positionpublic boolean contains(int v)
v
- value to be added
public int[] finish()
public void reset()
public static IntList createOrder(byte[][] tok, boolean num, boolean asc)
IntList
instance
with the sort order of all tokens.
tok
- token array to sort bynum
- numeric sortasc
- ascending
public void sort()
public void sort(byte[][] tok, boolean num, boolean asc)
tok
- token array to sort bynum
- numeric sortasc
- ascendingpublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |