Plexus v0.13.1

com.phoenixst.plexus
Interface TraverserPredicate

All Superinterfaces:
org.apache.commons.collections.Predicate

public interface TraverserPredicate
extends org.apache.commons.collections.Predicate

A general interface for Predicates for traversals that can be piecewise defined. These objects can be used by:

Since:
1.0
Version:
$Revision: 1.4 $
Author:
Ray A. Conner

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

evaluate

boolean evaluate(Object object)
Returns 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.

Specified by:
evaluate in interface org.apache.commons.collections.Predicate

getUserObjectSpecification

Object getUserObjectSpecification()
Gets the user object specification for this 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.


getNodeSpecification

Object getNodeSpecification()
Gets the node specification for this 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.


getDirectionFlags

int getDirectionFlags()
Gets the direction flags for this 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:


Plexus v0.13.1

See the Plexus project home, hosted by SourceForge.
Copyright ? 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.