Package com.streambase.sb.unittest
Class FieldBasedTupleComparator.CompareFunctor
- java.lang.Object
-
- com.streambase.sb.unittest.FieldBasedTupleComparator.CompareFunctor
-
- All Implemented Interfaces:
DataType.Registry.Functor
- Direct Known Subclasses:
FieldBasedTupleComparator.DoubleCompareFunctor
,FieldBasedTupleComparator.IgnoreTimestampCompareFunctor
,FieldBasedTupleComparator.ListCompareFunctor
,FieldBasedTupleComparator.NaiveObjectCompareFunctor
,FieldBasedTupleComparator.RegexCompareFunctor
,FieldBasedTupleComparator.TupleCompareFunctor
- Enclosing class:
- FieldBasedTupleComparator
public abstract static class FieldBasedTupleComparator.CompareFunctor extends Object implements DataType.Registry.Functor
A strategy object for handling comparisons of specific field types.
-
-
Constructor Summary
Constructors Constructor Description CompareFunctor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
compare(TupleComparator comparator, CompleteDataType cdt, Object expected, Object actual)
Handle null checks before delegating tocompareImpl(com.streambase.sb.unittest.TupleComparator, com.streambase.sb.CompleteDataType, java.lang.Object, java.lang.Object)
abstract boolean
compareImpl(TupleComparator comparator, CompleteDataType cdt, Object expected, Object actual)
Compare two values expected and actual, usingcomparator
for recursion as necessary.
-
-
-
Method Detail
-
compare
public boolean compare(TupleComparator comparator, CompleteDataType cdt, Object expected, Object actual) throws StreamBaseException
Handle null checks before delegating tocompareImpl(com.streambase.sb.unittest.TupleComparator, com.streambase.sb.CompleteDataType, java.lang.Object, java.lang.Object)
- Throws:
StreamBaseException
-
compareImpl
public abstract boolean compareImpl(TupleComparator comparator, CompleteDataType cdt, Object expected, Object actual) throws StreamBaseException
Compare two values expected and actual, usingcomparator
for recursion as necessary.- 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
- Throws:
StreamBaseException
-
-