prefuse.data.util
Class ValidEdgePredicate

java.lang.Object
  extended by prefuse.data.expression.AbstractExpression
      extended by prefuse.data.expression.AbstractPredicate
          extended by prefuse.data.util.ValidEdgePredicate
All Implemented Interfaces:
java.util.EventListener, ExpressionListener, Expression, Predicate

public class ValidEdgePredicate
extends AbstractPredicate

Filtering predicate over a potential edge table that indicates which edges are valid edges according to a backing node table. Useful for creating a pool of edges for which not all node have been created, and then filtering out the valid edges using the node pool.

Author:
jeffrey heer

Constructor Summary
ValidEdgePredicate(Graph g)
          Creates a new ValidEdgePredicate.
 
Method Summary
 boolean getBoolean(Tuple tpl)
          Indicates if the given tuple can be used as a valid edge for the nodes of the backing graph.
 
Methods inherited from class prefuse.data.expression.AbstractPredicate
get, getType
 
Methods inherited from class prefuse.data.expression.AbstractExpression
addChildListeners, addExpressionListener, expressionChanged, fireExpressionChange, getDouble, getFloat, getInt, getLong, hasListeners, removeChildListeners, removeExpressionListener, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface prefuse.data.expression.Expression
addExpressionListener, getDouble, getFloat, getInt, getLong, removeExpressionListener, visit
 

Constructor Detail

ValidEdgePredicate

public ValidEdgePredicate(Graph g)
Creates a new ValidEdgePredicate.

Parameters:
g - the backing graph, the node table of this graph will be used to check for valid edges.
Method Detail

getBoolean

public boolean getBoolean(Tuple tpl)
Indicates if the given tuple can be used as a valid edge for the nodes of the backing graph.

Specified by:
getBoolean in interface Expression
Overrides:
getBoolean in class AbstractExpression
Parameters:
tpl - a data tuple from a potential edge table
Returns:
true if the tuple contents allow it to serve as a valid edge of between nodes in the backing graph
See Also:
Expression.getBoolean(prefuse.data.Tuple)


Copyright © 2007 Regents of the University of California