org.shapelogic.predicate
Class OnePredicateSelector<T>

java.lang.Object
  extended by org.shapelogic.predicate.CompositePredicate<T>
      extended by org.shapelogic.predicate.OnePredicate<T>
          extended by org.shapelogic.predicate.OnePredicateSelector<T>
Type Parameters:
T -
All Implemented Interfaces:
Calc1<T,java.lang.String>, Predicate<T>

public class OnePredicateSelector<T>
extends OnePredicate<T>
implements Calc1<T,java.lang.String>

OnePredicateSelector is an XOR or One Predicate where you can also see which predicate returned true.

Author:
Sami Badawi

Field Summary
protected  NamedPredicate<T>[] _namedPredicates
           
 
Fields inherited from class org.shapelogic.predicate.CompositePredicate
_predicates
 
Constructor Summary
OnePredicateSelector(NamedPredicate<T>[] predicates)
           
 
Method Summary
 java.lang.String invoke(T input)
           
 
Methods inherited from class org.shapelogic.predicate.OnePredicate
evaluate
 
Methods inherited from class org.shapelogic.predicate.CompositePredicate
getPredicates
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_namedPredicates

protected final NamedPredicate<T>[] _namedPredicates
Constructor Detail

OnePredicateSelector

public OnePredicateSelector(NamedPredicate<T>[] predicates)
Method Detail

invoke

public java.lang.String invoke(T input)
Specified by:
invoke in interface Calc1<T,java.lang.String>


Copyright © 2009. All Rights Reserved.