|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.util.IntList
public class IntList
This is a simple container for native int values.
Constructor Summary | |
---|---|
IntList()
Default constructor. |
|
IntList(double f)
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. |
int |
find(int v)
Searches for the specified value via binary search. |
int[] |
finish()
Finishes the int array. |
int |
get(int p)
Returns the specified value. |
void |
reset()
Resets the integer list. |
void |
set(int v,
int p)
Sets a value at the specified position. |
int |
size()
Returns the number of entries. |
void |
sort()
Sorts the data. |
void |
sort(byte[][] tok,
boolean num,
boolean asc)
Sorts the data in the order of the specified token array. |
void |
sort(double[] num,
boolean asc)
Sorts the data in the order of the specified numeric array. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IntList()
public IntList(int is)
is
- initial size of the listpublic IntList(double f)
f
- resize factorpublic IntList(int[] v)
v
- initial list valuesMethod Detail |
---|
public final void add(int v)
v
- value to be addedpublic final int size()
public final int get(int p)
p
- position
public final void set(int v, int p)
v
- value to be addedp
- positionpublic final boolean contains(int v)
v
- value to be added
public final int find(int v)
v
- value to find
public final int[] finish()
public final void reset()
public void sort()
public final void sort(byte[][] tok, boolean num, boolean asc)
tok
- token array to sort bynum
- numeric sortasc
- ascendingpublic final void sort(double[] num, boolean asc)
num
- token array to sort byasc
- ascendingpublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |