net.sf.twip.parameterhandler
Class AbstractNumberParameterHandler
java.lang.Object
net.sf.twip.parameterhandler.ParameterHandler
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractNumberParameterHandler
public AbstractNumberParameterHandler(Parameter parameter)
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.