Class NamedPredicateDecorator<T>

  extended by 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.

Sami Badawi

Field Summary
protected  java.lang.String _ohName
protected  Predicate<T> _predicate
Constructor Summary
NamedPredicateDecorator(Predicate<T> predicate, java.lang.String ohName)
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

Field Detail


protected final Predicate<T> _predicate


protected final java.lang.String _ohName
Constructor Detail


public NamedPredicateDecorator(Predicate<T> predicate,
                               java.lang.String ohName)
Method Detail


public boolean evaluate(T input)
Description copied from interface: Predicate
Checks if a binary predicate relation holds.

Specified by:
evaluate in interface Predicate<T>


public java.lang.String getOhName()
Specified by:
getOhName in interface OHInterface

Copyright © 2009. All Rights Reserved.