org.shapelogic.predicate
Class NamedPredicateDecorator<T>
java.lang.Object
org.shapelogic.predicate.NamedPredicateDecorator<T>
- Type Parameters:
E
-
- All Implemented Interfaces:
- NamedPredicate<T>, Predicate<T>, OHInterface
public class NamedPredicateDecorator<T>
- extends java.lang.Object
- implements NamedPredicate<T>
NamedPredicate is a predicate with and OH name, Object Hypothesis name.
This is used for XOR or OnePredicate. You want to know what predicate that
was satisfied.
- Author:
- Sami Badawi
Method Summary |
boolean |
evaluate(T input)
Checks if a binary predicate relation holds. |
java.lang.String |
getOhName()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_predicate
protected final Predicate<T> _predicate
_ohName
protected final java.lang.String _ohName
NamedPredicateDecorator
public NamedPredicateDecorator(Predicate<T> predicate,
java.lang.String ohName)
evaluate
public boolean evaluate(T input)
- Description copied from interface:
Predicate
- Checks if a binary predicate relation holds.
- Specified by:
evaluate
in interface Predicate<T>
getOhName
public java.lang.String getOhName()
- Specified by:
getOhName
in interface OHInterface
Copyright © 2008. All Rights Reserved.