|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.basex.data.Nodes
public final class Nodes
This class stores node references of a database in an ascending order.
Instances of this class are used in the Context class to
reference the currently used nodes.
| Field Summary | |
|---|---|
Data |
data
Root Node. |
FTPosData |
ftpos
Fulltext position data. |
int[] |
nodes
Pre values container. |
int[] |
sorted
Sorted pre values. |
| Constructor Summary | |
|---|---|
Nodes(Data d)
Node Set constructor. |
|
Nodes(Data d,
FTPosData ft)
Node Set constructor. |
|
Nodes(int[] n,
Data d)
Node Set constructor. |
|
Nodes(int[] n,
Data d,
FTPosData ft)
Node Set constructor. |
|
Nodes(int n,
Data d)
Node Set constructor. |
|
| Method Summary | |
|---|---|
boolean |
contains(int p)
Checks if the specified node is contained in the array. |
int |
find(int p)
Returns the position of the specified node or the negative value - 1 of the position where it should have been found. |
boolean |
same(Result v)
Compares values for equality. |
void |
serialize(Serializer ser)
Serializes the complete result. |
void |
serialize(Serializer ser,
int n)
Serializes the specified result. |
void |
set(int[] n)
Sets the specified values. |
int |
size()
Number of values, stored in the result instance. |
void |
sort()
Creates a sorted node array. |
void |
toggle(int p)
The specified pre value is added to or removed from the node array. |
java.lang.String |
toString()
|
void |
union(int[] p)
The specified nodes are merged. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public Data data
public FTPosData ftpos
public int[] nodes
public int[] sorted
| Constructor Detail |
|---|
public Nodes(Data d)
d - data reference
public Nodes(Data d,
FTPosData ft)
d - data referenceft - ft position data
public Nodes(int n,
Data d)
n - single noded - data reference
public Nodes(int[] n,
Data d)
n - node setd - data reference
public Nodes(int[] n,
Data d,
FTPosData ft)
n - node setd - data referenceft - ft position data| Method Detail |
|---|
public void set(int[] n)
n - valuespublic int size()
Result
size in interface Resultpublic boolean same(Result v)
Result
same in interface Resultv - value to be compared
public boolean contains(int p)
p - pre value
public int find(int p)
p - pre value
public void sort()
public void toggle(int p)
p - pre valuepublic void union(int[] p)
p - pre value
public void serialize(Serializer ser)
throws java.io.IOException
Result
serialize in interface Resultser - serializer
java.io.IOException - exception
public void serialize(Serializer ser,
int n)
throws java.io.IOException
Result
serialize in interface Resultser - serializern - number of result to serialize
java.io.IOException - exceptionpublic 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 | |||||||||