com.phoenixst.plexus

Class EdgePredicateFactory

public class EdgePredicateFactory extends Object

A factory for creating EdgePredicates.

Since: 1.0

Version: $Revision: 1.10 $

Author: Ray A. Conner

Method Summary
static EdgePredicatecreate(Graph.Edge edge)
Creates a new EdgePredicate which tests for Graph.Edges which look just like the specified edge.
static EdgePredicatecreateEquals(Object userObject, Object firstNode, Object secondNode, int directionFlags)
Creates a new EdgePredicate which tests for Graph.Edges that contain the specified user object, have the specified endpoints, and have the specified direction relative to firstNode.
static EdgePredicatecreateEqualsNodes(Object firstNode, Object secondNode, int directionFlags)
Creates a new EdgePredicate which tests for Graph.Edges that have the specified endpoints and direction relative to firstNode.
static EdgePredicatecreateEqualsUser(Object userObject, int directionFlags)
Creates a new EdgePredicate which tests for Graph.Edges that contain the specified user object and have the specified directedness.
static EdgePredicatecreatePredicated(Predicate userObjectPredicate, Predicate firstNodePredicate, Predicate secondNodePredicate, int directionFlags)
Creates a new EdgePredicate which tests for Graph.Edges whose contained user object and endpoints satisfy the specified Predicates, and which have the specified direction relative to the endpoint satisyfing the firstNodePredicate.

Method Detail

create

public static final EdgePredicate create(Graph.Edge edge)
Creates a new EdgePredicate which tests for Graph.Edges which look just like the specified edge. To pass the returned Predicate, an edge must have the same endpoints, contained user object, and directedness. If the specified edge is undirected, then the endpoints may be swapped and still be valid.

createEquals

public static final EdgePredicate createEquals(Object userObject, Object firstNode, Object secondNode, int directionFlags)
Creates a new EdgePredicate which tests for Graph.Edges that contain the specified user object, have the specified endpoints, and have the specified direction relative to firstNode.

createEqualsNodes

public static final EdgePredicate createEqualsNodes(Object firstNode, Object secondNode, int directionFlags)
Creates a new EdgePredicate which tests for Graph.Edges that have the specified endpoints and direction relative to firstNode.

createEqualsUser

public static final EdgePredicate createEqualsUser(Object userObject, int directionFlags)
Creates a new EdgePredicate which tests for Graph.Edges that contain the specified user object and have the specified directedness.

createPredicated

public static final EdgePredicate createPredicated(Predicate userObjectPredicate, Predicate firstNodePredicate, Predicate secondNodePredicate, int directionFlags)
Creates a new EdgePredicate which tests for Graph.Edges whose contained user object and endpoints satisfy the specified Predicates, and which have the specified direction relative to the endpoint satisyfing the firstNodePredicate.
See the Plexus project home, hosted by SourceForge.
Copyright B) 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.