|
Plexus v0.13.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface TraverserPredicate
A general interface for Predicates for traversals
that can be piecewise defined. These objects can be used by:
Graph.degree( node, Predicate )
Graph.adjacentNodes( node, Predicate )
Graph.incidentEdges( node, Predicate )
Graph.getAdjacentNode( node, Predicate )
Graph.getIncidentEdge( node, Predicate )
Graph.traverser( node, Predicate )
| Method Summary | |
|---|---|
boolean |
evaluate(Object object)
Returns true if the specified object satisfies
this TraverserPredicate, and false
otherwise. |
int |
getDirectionFlags()
Gets the direction flags for this TraverserPredicate relative to the node
from which the Graph.Edge is being
traversed. |
Object |
getNodeSpecification()
Gets the node specification for this TraverserPredicate. |
Object |
getUserObjectSpecification()
Gets the user object specification for this TraverserPredicate. |
| Method Detail |
|---|
boolean evaluate(Object object)
true if the specified object satisfies
this TraverserPredicate, and false
otherwise. The specified obect is expected to be an instance
of OrderedPair. The first
element of the OrderedPair is the node
from which the Graph.Edge is being
traversed, the second is the Graph.Edge itself.
evaluate in interface org.apache.commons.collections.PredicateObject getUserObjectSpecification()
TraverserPredicate.
If the returned object is a Predicate, then
that Predicate must evaluate to true
when testing the contained user object for this
TraverserPredicate to be true.
If the returned object is anything other than a
Predicate, then the contained user object must be
.equals() to the specified object (or it must be
null if the specified object is
null) for this TraverserPredicate to
be true.
Object getNodeSpecification()
TraverserPredicate.
If the returned object is a Predicate, then
that Predicate must evaluate to true
when testing the node for this TraverserPredicate
to be true.
If the returned object is anything other than a
Predicate, then the node must be
.equals() to the specified object (or it must be
null if the specified object is
null) for this TraverserPredicate to
be true.
int getDirectionFlags()
TraverserPredicate relative to the node
from which the Graph.Edge is being
traversed. It may be any of the following values, or some
combination made using bitwise-or:
GraphUtils.UNDIRECTED_MASK
GraphUtils.DIRECTED_OUT_MASK
GraphUtils.DIRECTED_IN_MASK
GraphUtils.DIRECTED_MASK
GraphUtils.ANY_DIRECTION_MASK
|
Plexus v0.13.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||