public final class DBNodes extends Object implements Result
Context
class to
reference the currently used, marked, and copied nodes.Modifier and Type | Field and Description |
---|---|
boolean |
all
Pre values comprise all documents of the database.
|
Data |
data
Root node.
|
int[] |
pres
Pre values.
|
int[] |
sorted
Sorted pre values.
|
Constructor and Description |
---|
DBNodes(Data data,
FTPosData ftpos,
int... pres)
Constructor, specifying a database, pre values and full-text positions.
|
DBNodes(Data data,
int... pres)
Constructor, specifying a database and pre values.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(int pre)
Checks if the specified node is contained in the array.
|
DBNodes |
discardDocs()
Returns
null if the pre values comprise all documents of the database. |
boolean |
equals(Object obj) |
int |
find(int pre)
Returns the position of the specified node or the negative value - 1 of
the position where it should have been found.
|
FTPosData |
ftpos()
Returns full-text position data.
|
String |
serialize()
Serializes the result, using the standard serializer.
|
void |
serialize(Serializer ser)
Serializes the result.
|
void |
serialize(Serializer ser,
int pre)
Serializes the item with the specified index.
|
long |
size()
Number of items, stored in the result instance.
|
void |
toggle(int pre)
Adds or removes the specified pre node.
|
String |
toString() |
void |
union(int[] pre)
Merges the specified array with the existing pre nodes.
|
public boolean all
public final Data data
public int[] pres
public int[] sorted
public DBNodes(Data data, int... pres)
data
- data referencepres
- pre valuespublic long size()
Result
public DBNodes discardDocs()
null
if the pre values comprise all documents of the database.null
public boolean contains(int pre)
pre
- pre valuepublic int find(int pre)
pre
- pre valuepublic void toggle(int pre)
pre
- pre valuepublic void union(int[] pre)
pre
- pre valuepublic FTPosData ftpos()
public void serialize(Serializer ser) throws IOException
Result
serialize
in interface Result
ser
- serializerIOException
- I/O exceptionpublic void serialize(Serializer ser, int pre) throws IOException
Result
serialize
in interface Result
ser
- serializerpre
- offset of result to serializeIOException
- I/O exceptionpublic String serialize() throws IOException
Result
serialize
in interface Result
IOException
- I/O exceptionCopyright © 2005–2015 BaseX Team. All rights reserved.