prefuse.data.expression
Class OrPredicate

java.lang.Object
  extended byprefuse.data.expression.AbstractExpression
      extended byprefuse.data.expression.AbstractPredicate
          extended byprefuse.data.expression.CompositePredicate
              extended byprefuse.data.expression.OrPredicate
All Implemented Interfaces:
java.util.EventListener, Expression, ExpressionListener, Predicate

public class OrPredicate
extends CompositePredicate

Predicate representing an "or" clause of sub-predicates.

Author:
jeffrey heer

Field Summary
 
Fields inherited from class prefuse.data.expression.CompositePredicate
m_clauses
 
Constructor Summary
OrPredicate()
          Create an empty OrPredicate.
OrPredicate(Predicate p1)
          Create a new OrPredicate.
OrPredicate(Predicate p1, Predicate p2)
          Create a new OrPredicate.
 
Method Summary
 boolean getBoolean(Tuple t)
          Evaluate the Expression on the given input Tuple.
 java.lang.String toString()
           
 
Methods inherited from class prefuse.data.expression.CompositePredicate
add, addChildListeners, clear, get, getSubPredicate, remove, removeChildListeners, set, set, size, toString, visit
 
Methods inherited from class prefuse.data.expression.AbstractPredicate
get, getType
 
Methods inherited from class prefuse.data.expression.AbstractExpression
addExpressionListener, expressionChanged, fireExpressionChange, getDouble, getFloat, getInt, getLong, hasListeners, removeExpressionListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface prefuse.data.expression.Expression
addExpressionListener, getDouble, getFloat, getInt, getLong, removeExpressionListener
 

Constructor Detail

OrPredicate

public OrPredicate()
Create an empty OrPredicate. Empty OrPredicates return false by default.


OrPredicate

public OrPredicate(Predicate p1)
Create a new OrPredicate.

Parameters:
p1 - the sole clause of this predicate

OrPredicate

public OrPredicate(Predicate p1,
                   Predicate p2)
Create a new OrPredicate.

Parameters:
p1 - the first clause of this predicate
p2 - the second clause of this predicate
Method Detail

getBoolean

public boolean getBoolean(Tuple t)
Description copied from interface: Expression
Evaluate the Expression on the given input Tuple.

Specified by:
getBoolean in interface Expression
Overrides:
getBoolean in class AbstractExpression
See Also:
Expression.getBoolean(prefuse.data.Tuple)

toString

public java.lang.String toString()
See Also:
Object.toString()


Copyright ? 2007 Regents of the University of California