net.sf.twip.parameterhandler
Class AbstractNumberParameterHandler

java.lang.Object
  extended by net.sf.twip.parameterhandler.ParameterHandler
      extended by net.sf.twip.parameterhandler.AbstractNumberParameterHandler
Direct Known Subclasses:
AbstractFloatingPointNumberParameterHandler, ByteParameterHandler, EnumParameterHandler, IntegerParameterHandler, LongParameterHandler, ShortParameterHandler

public abstract class AbstractNumberParameterHandler
extends ParameterHandler

You can assume number parameters to be >, >=, !=, <=, or < to a numeric constant. You can assume float and double parameters additionally to be != NaN, != INF, and != -INF. Note that null "slips through" these tests, i.e. if you assume that an Integer argument is >= 0, then null is still passed in.


Nested Class Summary
protected static interface AbstractNumberParameterHandler.Tester
           
 
Field Summary
 
Fields inherited from class net.sf.twip.parameterhandler.ParameterHandler
parameter
 
Constructor Summary
AbstractNumberParameterHandler(Parameter parameter)
           
 
Method Summary
protected abstract  Comparable<? extends Number> getComparable(String numberExpression)
           
protected  AbstractNumberParameterHandler.Tester getTester(String expression)
           
 boolean test(Object value)
          Should this value go into the parameter values?
 
Methods inherited from class net.sf.twip.parameterhandler.ParameterHandler
getDefaultParameterValues, getParameterValues, of
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractNumberParameterHandler

public AbstractNumberParameterHandler(Parameter parameter)
Method Detail

getComparable

protected abstract Comparable<? extends Number> getComparable(String numberExpression)

getTester

protected AbstractNumberParameterHandler.Tester getTester(String expression)

test

public boolean test(Object value)
Description copied from class: ParameterHandler
Should this value go into the parameter values?

Overrides:
test in class ParameterHandler
Parameters:
value - the value to check


Copyright © 2011. All Rights Reserved.