net.sf.staccatocommons.lang.predicate
Class AbstractPredicate.Soft<A>

java.lang.Object
  extended by net.sf.staccatocommons.lang.predicate.AbstractPredicate<A>
      extended by net.sf.staccatocommons.lang.predicate.AbstractPredicate.Soft<A>
Type Parameters:
A - predicate argument type
All Implemented Interfaces:
net.sf.staccatocommons.defs.Applicable<A,Boolean>, net.sf.staccatocommons.defs.Evaluable<A>, net.sf.staccatocommons.defs.predicate.Predicate<A>
Enclosing class:
AbstractPredicate<A>

public abstract static class AbstractPredicate.Soft<A>
extends AbstractPredicate<A>

AbstractPredicate that handles exceptions by softening them using SoftException.soften(Throwable)

Author:
flbulgarelli

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.staccatocommons.lang.predicate.AbstractPredicate
AbstractPredicate.Soft<A>
 
Constructor Summary
AbstractPredicate.Soft()
           
 
Method Summary
 boolean eval(A arg)
           
protected abstract  boolean softEval(A arg)
          Evaluates this predicate, potentially throwing a checked exception
 
Methods inherited from class net.sf.staccatocommons.lang.predicate.AbstractPredicate
and, andNotNull, apply, not, of, or, orNull, toString, withEffectOnFalse, withEffectOnTrue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractPredicate.Soft

public AbstractPredicate.Soft()
Method Detail

eval

public final boolean eval(A arg)
Specified by:
eval in interface net.sf.staccatocommons.defs.Evaluable<A>
Specified by:
eval in class AbstractPredicate<A>

softEval

protected abstract boolean softEval(A arg)
                             throws Throwable
Evaluates this predicate, potentially throwing a checked exception

Throws:
Throwable
See Also:
Evaluable.eval(Object)


Copyright © 2010-2012 Staccatocommons. All Rights Reserved.