com.phoenixst.plexus
public interface TraverserPredicate extends Predicate
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 )
Since: 1.0
Version: $Revision: 1.4 $
| 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 Edge is being
traversed. |
| Object | getNodeSpecification()
Gets the node specification for this
TraverserPredicate.
|
| Object | getUserObjectSpecification()
Gets the user object specification for this
TraverserPredicate.
|
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 Edge is being
traversed, the second is the Graph.Edge itself.TraverserPredicate relative to the node
from which the Edge is being
traversed. It may be any of the following values, or some
combination made using bitwise-or:
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.
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.