public class NumberTolerantDataType extends NumberDataType
NumberDataType. Extends the
AbstractDataType.compare(Object, Object) method in order to respect precision tolerance.
This is comparable to the JUnit method
assert(double val1, double val2, double toleratedDelta).| Modifier and Type | Method and Description |
|---|---|
protected int |
compareNonNulls(Object value1cast,
Object value2cast)
The only method overwritten from the base implementation to compare numbers allowing a tolerance
|
ToleratedDeltaMap.Precision |
getToleratedDelta() |
static boolean |
isZero(BigDecimal value)
Checks if the given value is zero.
|
getSqlValue, setSqlValue, typeCastareObjectsEqual, compare, getSqlType, getTypeClass, isDateTime, isNumber, loadClass, loadClass, toStringasString, forObject, forSqlType, forSqlTypeNamepublic ToleratedDeltaMap.Precision getToleratedDelta()
protected int compareNonNulls(Object value1cast, Object value2cast) throws TypeCastException
compareNonNulls in class AbstractDataTypevalue1cast - First value resulting from the DataType.typeCast(Object) method callvalue2cast - Second value resulting from the DataType.typeCast(Object) method callComparable.compareTo(Object) invocation.TypeCastExceptionAbstractDataType.compareNonNulls(java.lang.Object, java.lang.Object)public static final boolean isZero(BigDecimal value)
value - true if and only if the given value is zero.Copyright © 2002-2012. All Rights Reserved.