Package com.streambase.sb.unittest
Class FieldBasedTupleComparator.DoubleCompareFunctor
- java.lang.Object
-
- com.streambase.sb.unittest.FieldBasedTupleComparator.CompareFunctor
-
- com.streambase.sb.unittest.FieldBasedTupleComparator.DoubleCompareFunctor
-
- All Implemented Interfaces:
DataType.Registry.Functor
- Enclosing class:
- FieldBasedTupleComparator
public static class FieldBasedTupleComparator.DoubleCompareFunctor extends FieldBasedTupleComparator.CompareFunctor
Compare double values using a ratio test and a tolerance.
-
-
Constructor Summary
Constructors Constructor Description DoubleCompareFunctor()
DoubleCompareFunctor(double tolerance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
compareImpl(TupleComparator comparator, CompleteDataType cdt, Object expected, Object actual)
Compare two values expected and actual, usingcomparator
for recursion as necessary.-
Methods inherited from class com.streambase.sb.unittest.FieldBasedTupleComparator.CompareFunctor
compare
-
-
-
-
Method Detail
-
compareImpl
public boolean compareImpl(TupleComparator comparator, CompleteDataType cdt, Object expected, Object actual)
Description copied from class:FieldBasedTupleComparator.CompareFunctor
Compare two values expected and actual, usingcomparator
for recursion as necessary.- Specified by:
compareImpl
in classFieldBasedTupleComparator.CompareFunctor
- Parameters:
comparator
- recurse through this argument for parameterized types.expected
- a non-null objectactual
- a non-null object- Returns:
- true if and only if the values are considered equal
-
-