edu.uci.ics.jung.graph.predicates
Class ThresholdPredicate
java.lang.Object
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
Constructor Summary |
ThresholdPredicate(double threshold,
boolean greater_equal)
Creates a ThresholdPredicate with the specified threshold value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
threshold
protected double threshold
greater_equal
protected boolean greater_equal
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 valuegreater_equal
-
evaluate
public boolean evaluate(Object arg0)
- Specified by:
evaluate
in interface Predicate
- See Also:
Predicate.evaluate(java.lang.Object)