astcentric.structure.query
Class Union

java.lang.Object
  extended by astcentric.structure.query.Union
All Implemented Interfaces:
NodeCollector

public class Union
extends java.lang.Object


Field Summary
protected  java.util.List<NodeCollector> _collectors
           
 
Constructor Summary
Union()
           
 
Method Summary
 void add(NodeCollector collector)
          Appends the specified collector to the list of collectors.
 NodeCollection collect(Node node, QueryContext context)
          Creates a node collection for the specified node.
protected  astcentric.structure.query.AbstractNodeCollectorCollection createCollectorCollection()
           
protected  java.util.Set<Node> gatherNodes(Node node, QueryContext queryContext, int startIndex)
           
 void traverseCollectors(NodeCollectorHandler handler)
          Traverses over all collectors in the order their had been added and sends them to the specified handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_collectors

protected final java.util.List<NodeCollector> _collectors
Constructor Detail

Union

public Union()
Method Detail

collect

public NodeCollection collect(Node node,
                              QueryContext context)
Description copied from interface: NodeCollector
Creates a node collection for the specified node.

Parameters:
node - A non-null node which might be related to the collection to be created.
context - A non-null query context.
Returns:
never null.

add

public void add(NodeCollector collector)
Appends the specified collector to the list of collectors.


traverseCollectors

public void traverseCollectors(NodeCollectorHandler handler)
Traverses over all collectors in the order their had been added and sends them to the specified handler.


gatherNodes

protected java.util.Set<Node> gatherNodes(Node node,
                                          QueryContext queryContext,
                                          int startIndex)

createCollectorCollection

protected astcentric.structure.query.AbstractNodeCollectorCollection createCollectorCollection()