org.exist.dom
Class ArraySet
java.lang.Object
org.exist.dom.NodeSet
org.exist.dom.ArraySet
- All Implemented Interfaces:
- org.w3c.dom.NodeList
- public class ArraySet
- extends NodeSet
Constructor Summary |
ArraySet(int initialCapacity)
Constructor for the ArraySet object |
Method Summary |
void |
add(DocumentImpl doc,
long nodeId)
|
void |
add(DocumentImpl doc,
long nodeId,
Value value)
|
void |
add(org.w3c.dom.Node node)
|
void |
add(NodeProxy proxy)
|
void |
addAll(org.w3c.dom.NodeList other)
|
void |
addAll(NodeSet other)
|
protected void |
checkSorted()
|
void |
clear()
|
boolean |
contains(DocumentImpl doc,
long nodeId)
|
boolean |
contains(NodeProxy proxy)
|
NodeProxy |
get(DocumentImpl doc,
long nodeId)
|
NodeProxy |
get(int pos)
|
NodeProxy |
get(NodeProxy p)
|
NodeSet |
getAncestors(NodeSet other,
boolean includeSelf,
boolean rememberContext)
For a given set of potential ancestor nodes, get the
descendants in this node set |
NodeSet |
getChildren(DocumentImpl doc,
long gid)
|
ArraySet |
getChildren(NodeSet ancestors,
int mode,
boolean rememberContext)
|
NodeSet |
getDescendants(NodeSet other,
int mode)
|
NodeSet |
getDescendants(NodeSet other,
int mode,
boolean includeSelf)
|
NodeSet |
getDescendants(NodeSet other,
int mode,
boolean includeSelf,
boolean rememberContext)
For a given set of potential ancestor nodes, get the
descendants in this node set |
int |
getLength()
|
NodeSet |
getRange(DocumentImpl doc,
long lower,
long upper)
|
NodeSet |
getRange(NodeProxy lower,
NodeProxy upper)
|
boolean |
hasIndex()
|
protected boolean |
isSorted()
|
org.w3c.dom.Node |
item(int pos)
|
java.util.Iterator |
iterator()
|
NodeProxy |
nodeHasParent(DocumentImpl doc,
long gid,
boolean directParent)
|
NodeProxy |
nodeHasParent(DocumentImpl doc,
long gid,
boolean directParent,
boolean includeSelf)
|
NodeProxy |
parentWithChild(DocumentImpl doc,
long gid,
boolean directParent,
boolean includeSelf)
|
NodeProxy |
parentWithChild(NodeProxy proxy,
boolean directParent,
boolean includeSelf)
|
int |
position(NodeImpl test)
|
int |
position(NodeProxy proxy)
|
void |
remove(NodeProxy node)
|
void |
setIsSorted(boolean sorted)
|
void |
sort()
|
Methods inherited from class org.exist.dom.NodeSet |
contains, getChildren, getContextNodes, getParents, getSiblings, intersection, nodeHasParent, nodeHasParent, nodeHasParent, parentWithChild, parentWithChild, union |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ANCESTOR
public static final int ANCESTOR
- See Also:
- Constant Field Values
DESCENDANT
public static final int DESCENDANT
- See Also:
- Constant Field Values
LOG
protected static org.apache.log4j.Logger LOG
counter
protected int counter
length
protected int length
nodes
protected NodeProxy[] nodes
sorted
protected boolean sorted
ArraySet
public ArraySet(int initialCapacity)
- Constructor for the ArraySet object
- Parameters:
initialCapacity
- Description of the Parameter
add
public void add(NodeProxy proxy)
- Overrides:
add
in class NodeSet
add
public void add(DocumentImpl doc,
long nodeId)
- Overrides:
add
in class NodeSet
add
public void add(DocumentImpl doc,
long nodeId,
Value value)
add
public void add(org.w3c.dom.Node node)
- Overrides:
add
in class NodeSet
addAll
public void addAll(NodeSet other)
- Specified by:
addAll
in class NodeSet
addAll
public void addAll(org.w3c.dom.NodeList other)
- Overrides:
addAll
in class NodeSet
hasIndex
public boolean hasIndex()
- Overrides:
hasIndex
in class NodeSet
checkSorted
protected void checkSorted()
clear
public void clear()
contains
public boolean contains(DocumentImpl doc,
long nodeId)
- Specified by:
contains
in class NodeSet
contains
public boolean contains(NodeProxy proxy)
- Specified by:
contains
in class NodeSet
get
public NodeProxy get(DocumentImpl doc,
long nodeId)
- Specified by:
get
in class NodeSet
get
public NodeProxy get(NodeProxy p)
- Specified by:
get
in class NodeSet
get
public NodeProxy get(int pos)
- Specified by:
get
in class NodeSet
getChildren
public NodeSet getChildren(DocumentImpl doc,
long gid)
getChildren
public ArraySet getChildren(NodeSet ancestors,
int mode,
boolean rememberContext)
- Overrides:
getChildren
in class NodeSet
getDescendants
public NodeSet getDescendants(NodeSet other,
int mode)
- Overrides:
getDescendants
in class NodeSet
getDescendants
public NodeSet getDescendants(NodeSet other,
int mode,
boolean includeSelf)
- Overrides:
getDescendants
in class NodeSet
getDescendants
public NodeSet getDescendants(NodeSet other,
int mode,
boolean includeSelf,
boolean rememberContext)
- For a given set of potential ancestor nodes, get the
descendants in this node set
- Overrides:
getDescendants
in class NodeSet
- Parameters:
mode
- Description of the Parameterother
- node set containing potential ancestors
- Returns:
- The descendants value
getAncestors
public NodeSet getAncestors(NodeSet other,
boolean includeSelf,
boolean rememberContext)
- For a given set of potential ancestor nodes, get the
descendants in this node set
- Overrides:
getAncestors
in class NodeSet
- Parameters:
other
- node set containing potential ancestors
- Returns:
- The descendants value
getLength
public int getLength()
- Specified by:
getLength
in interface org.w3c.dom.NodeList
- Specified by:
getLength
in class NodeSet
getRange
public NodeSet getRange(NodeProxy lower,
NodeProxy upper)
getRange
public NodeSet getRange(DocumentImpl doc,
long lower,
long upper)
- Overrides:
getRange
in class NodeSet
isSorted
protected boolean isSorted()
item
public org.w3c.dom.Node item(int pos)
- Specified by:
item
in interface org.w3c.dom.NodeList
- Specified by:
item
in class NodeSet
iterator
public java.util.Iterator iterator()
- Specified by:
iterator
in class NodeSet
nodeHasParent
public NodeProxy nodeHasParent(DocumentImpl doc,
long gid,
boolean directParent,
boolean includeSelf)
- Overrides:
nodeHasParent
in class NodeSet
nodeHasParent
public NodeProxy nodeHasParent(DocumentImpl doc,
long gid,
boolean directParent)
parentWithChild
public NodeProxy parentWithChild(DocumentImpl doc,
long gid,
boolean directParent,
boolean includeSelf)
- Overrides:
parentWithChild
in class NodeSet
parentWithChild
public NodeProxy parentWithChild(NodeProxy proxy,
boolean directParent,
boolean includeSelf)
- Overrides:
parentWithChild
in class NodeSet
position
public int position(NodeImpl test)
position
public int position(NodeProxy proxy)
remove
public void remove(NodeProxy node)
- Overrides:
remove
in class NodeSet
setIsSorted
public void setIsSorted(boolean sorted)
sort
public final void sort()
Copyright (C) Wolfgang Meier. All rights reserved.