Plexus v0.13.1

com.phoenixst.plexus
Class TraverserPredicateFactory

java.lang.Object
  extended by com.phoenixst.plexus.TraverserPredicateFactory

public class TraverserPredicateFactory
extends Object

A factory for creating TraverserPredicates.

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

Method Summary
static TraverserPredicate create(Graph.Edge edge, boolean fromTail)
          Creates a new TraverserPredicate which tests for Graph.Edges which look just like the specified edge, ignoring one endpoint.
static TraverserPredicate createEquals(Object userObject, Object node, int directionFlags)
          Creates a new TraverserPredicate which tests for traversals over Graph.Edges that contain the specified user object, to the specified node, with a direction specified relative to the endpoint from which the Graph.Edge is being traversed.
static TraverserPredicate createEqualsNode(Object node, int directionFlags)
          Creates a new TraverserPredicate which tests for traversals to the specified node, with a direction specified relative to the endpoint from which the Graph.Edge is being traversed.
static TraverserPredicate createEqualsUser(Object userObject, int directionFlags)
          Creates a new TraverserPredicate which tests for traversals over Graph.Edges that contain the specified user object, with a direction specified relative to the endpoint from which the Graph.Edge is being traversed.
static TraverserPredicate createPredicated(org.apache.commons.collections.Predicate userObjectPredicate, org.apache.commons.collections.Predicate nodePredicate, int directionFlags)
          Creates a new TraverserPredicate which tests for traversals over Graph.Edges whose contained user object satisfies userObjectPredicate, to a node which satisfies nodePredicate, with a direction specified relative to the endpoint from which the Graph.Edge is being traversed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static final TraverserPredicate create(Graph.Edge edge,
                                              boolean fromTail)
Creates a new TraverserPredicate which tests for Graph.Edges which look just like the specified edge, ignoring one endpoint.

If fromTail is true, then the returned Predicate tests for traversals over Graph.Edges that contain the same user object, to the head of the specified edge, with the same directedness. In other words, test as if traversing from the tail looking for a similar Graph.Edge, although the tail itself is not checked.

If fromTail is false, then the returned Predicate tests for traversals over Graph.Edges that contain the same user object, to the tail of the specified edge, with the same directedness. In other words, test as if traversing from the head looking for a similar Graph.Edge, although the head itself is not checked.


createEqualsNode

public static final TraverserPredicate createEqualsNode(Object node,
                                                        int directionFlags)
Creates a new TraverserPredicate which tests for traversals to the specified node, with a direction specified relative to the endpoint from which the Graph.Edge is being traversed.


createEqualsUser

public static final TraverserPredicate createEqualsUser(Object userObject,
                                                        int directionFlags)
Creates a new TraverserPredicate which tests for traversals over Graph.Edges that contain the specified user object, with a direction specified relative to the endpoint from which the Graph.Edge is being traversed.


createEquals

public static final TraverserPredicate createEquals(Object userObject,
                                                    Object node,
                                                    int directionFlags)
Creates a new TraverserPredicate which tests for traversals over Graph.Edges that contain the specified user object, to the specified node, with a direction specified relative to the endpoint from which the Graph.Edge is being traversed.


createPredicated

public static final TraverserPredicate createPredicated(org.apache.commons.collections.Predicate userObjectPredicate,
                                                        org.apache.commons.collections.Predicate nodePredicate,
                                                        int directionFlags)
Creates a new TraverserPredicate which tests for traversals over Graph.Edges whose contained user object satisfies userObjectPredicate, to a node which satisfies nodePredicate, with a direction specified relative to the endpoint from which the Graph.Edge is being traversed.


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.