|
||||||||||
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. |
boolean |
doc
Doc flag (all nodes refer to documents). |
FTPosData |
ftpos
Full-text position data (for visualization). |
int[] |
nodes
Pre values container. |
int[] |
sorted
Sorted pre values. |
Constructor Summary | |
---|---|
Nodes(Data d)
Node Set constructor. |
|
Nodes(int[] n)
Node Set constructor (used by test classes). |
|
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. |
int |
size()
Number of values, stored in the result instance. |
void |
toggle(int p)
Adds or removes the specified pre node. |
String |
toString()
|
void |
union(int[] p)
Merges the specified array with the existing pre nodes. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public boolean doc
public Data data
public FTPosData ftpos
public int[] nodes
public int[] sorted
Constructor Detail |
---|
public Nodes(Data d)
d
- data referencepublic Nodes(int n, Data d)
n
- single noded
- data referencepublic Nodes(int[] n, Data d)
n
- node setd
- data referencepublic Nodes(int[] n, Data d, FTPosData ft)
n
- node setd
- data referenceft
- ft position datapublic Nodes(int[] n)
n
- node setMethod Detail |
---|
public int size()
Result
size
in interface Result
public boolean same(Result v)
Result
same
in interface Result
v
- value to be compared
public boolean contains(int p)
p
- pre value
public int find(int p)
p
- pre value
public void toggle(int p)
p
- pre valuepublic void union(int[] p)
p
- pre valuepublic void serialize(Serializer ser) throws IOException
Result
serialize
in interface Result
ser
- serializer
IOException
- I/O exceptionpublic void serialize(Serializer ser, int n) throws IOException
Result
serialize
in interface Result
ser
- serializern
- results offset to serialize
IOException
- I/O exceptionpublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |