|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.umber.catalan.process.queue.NodeSelection
Selection criteria for nodes within a IQueue. Might be a range of nodes, or a list of node indices, or even more complex selections that rely on the contents or Java class of each node. Used to select nodes for operations in QueueManager. By default, no nodes are selected. Indexes and ranges are evaluated first, then filters are applied to the remaining nodes.
QueueManager
Constructor Summary | |
NodeSelection()
Creates a new instance of NodeSelection. |
Method Summary | |
void |
addClassFilter(java.lang.Class filter)
Adds a constraint to select nodes of the given class or interface, or any derived classes. |
void |
addConstraint(java.lang.String constraint)
Adds the given selection constraint spec. |
void |
addIndex(int index)
Adds a constraint to select a single node by its zero-based index. |
void |
addRange(int startIndex,
int endIndex)
Adds a constraint for a contiguous span of its zero-based indexes to select. |
void |
addRegexpFilter(java.lang.String regexp)
Adds a constraint to select nodes that match the given regular expression. |
void |
clearSelection()
Removes all current selection constraints. |
void |
selectAll()
Adds a constraint to select all nodes. |
void |
selectEvens()
Adds a constraint to select all even nodes. |
int[] |
selectIndexes(java.util.List nodes)
Runs the selection constraints against the given nodes. |
void |
selectOdds()
Adds a constraint to select all odd nodes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NodeSelection()
Method Detail |
public void clearSelection()
public void selectAll()
public void selectEvens()
public void selectOdds()
public void addIndex(int index)
index
- index of the node to selectpublic void addRange(int startIndex, int endIndex)
startIndex
- index of low node to selectendIndex
- index of high node to selectpublic void addClassFilter(java.lang.Class filter)
filter
- Java Class to allow in the selectionpublic void addRegexpFilter(java.lang.String regexp)
toString
method, then compared to the regular expression.
regexp
- regular expression to allow in the selectionpublic void addConstraint(java.lang.String constraint)
constraint
- selection constraintpublic int[] selectIndexes(java.util.List nodes)
nodes
- node List to run the constraints against
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |