|
||||||||||
| 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 is a container for context nodes. Instances of this class are stored
in the Context class to reference the currently used nodes.
| Field Summary | |
|---|---|
Data |
data
Root Node. |
int[] |
nodes
Pre values container. |
int |
size
Number of stored nodes. |
| Constructor Summary | |
|---|---|
Nodes(Data d)
Node Set constructor. |
|
Nodes(int[] n,
Data d)
Node Set constructor. |
|
Nodes(int n,
Data d)
Node Set constructor. |
|
| Method Summary | |
|---|---|
Nodes |
copy()
Returns a copy of the node set. |
static int[] |
except(int[] ai,
int[] bi)
Subtracts the second from the first 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. |
static int[] |
intersect(int[] ai,
int[] bi)
Intersects two integer arrays via union. |
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)
The specified pre value is added to or removed from the context set. |
java.lang.String |
toString()
|
void |
union(int[] p)
The specified nodes are merged. |
static int[] |
union(int[] ai,
int[] bi)
Merges two integer arrays via union. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int[] nodes
public Data data
public int size
| Constructor Detail |
|---|
public Nodes(Data d)
d - data reference
public Nodes(int n,
Data d)
n - single noded - data reference
public Nodes(int[] n,
Data d)
n - node setd - data reference| Method Detail |
|---|
public int find(int p)
p - pre value
public void toggle(int p)
p - pre valuepublic void union(int[] p)
p - pre value
public static int[] union(int[] ai,
int[] bi)
ai - first setbi - second set
public static int[] intersect(int[] ai,
int[] bi)
ai - first setbi - second set
public static int[] except(int[] ai,
int[] bi)
ai - first setbi - second set
public int size()
size in interface Resultpublic Nodes copy()
public boolean same(Result v)
same in interface Resultv - value to be compared
public void serialize(Serializer ser)
throws java.io.IOException
serialize in interface Resultser - serializer
java.io.IOException - exception
public void serialize(Serializer ser,
int n)
throws java.io.IOException
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 | |||||||||