edu.uci.ics.jung.graph.predicates
Class ThresholdPredicate

java.lang.Object
  extended by edu.uci.ics.jung.graph.predicates.ThresholdPredicate
All Implemented Interfaces:
Predicate

public class ThresholdPredicate
extends Object
implements Predicate

A predicate which passes Numbers whose value satisfies a threshold requirement.

Author:
Joshua O'Madadhain

Field Summary
protected  boolean greater_equal
           
protected  double threshold
           
 
Constructor Summary
ThresholdPredicate(double threshold, boolean greater_equal)
          Creates a ThresholdPredicate with the specified threshold value.
 
Method Summary
 boolean evaluate(Object arg0)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

threshold

protected double threshold

greater_equal

protected boolean greater_equal
Constructor Detail

ThresholdPredicate

public ThresholdPredicate(double threshold,
                          boolean greater_equal)
Creates a ThresholdPredicate with the specified threshold value. If greater_equal is true, only objects whose double values are greater than or equal to threshold will evaluate to true; otherwise, only objects whose values are less than or equal will evaluate to true.

Parameters:
threshold - the threshold value
greater_equal -
Method Detail

evaluate

public boolean evaluate(Object arg0)
Specified by:
evaluate in interface Predicate
See Also:
Predicate.evaluate(java.lang.Object)