com.streambase.sb.unittest

## Class FieldBasedTupleComparator.CompareFunctor

- java.lang.Object
- - com.streambase.sb.unittest.FieldBasedTupleComparator.CompareFunctor

- 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

  A strategy object for handling comparisons of specific field types.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompareFunctor()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `compare(TupleComparator comparator, CompleteDataType cdt, Object expected, Object actual)` Handle null checks before delegating to `FieldBasedTupleComparator.CompareFunctor.compareImpl(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, using `comparator` for recursion as necessary.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CompareFunctor

          public CompareFunctor()

  - ### Method Detail

    - #### compare

          public boolean compare(TupleComparator comparator,
                                 CompleteDataType cdt,
                                 Object expected,
                                 Object actual)
                          throws StreamBaseException

      Handle null checks before delegating to `FieldBasedTupleComparator.CompareFunctor.compareImpl(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, using `comparator` for recursion as necessary.
      Parameters:
        `comparator` - recurse through this argument for parameterized types.
        `expected` - a non-null object
        `actual` - a non-null object
      Returns:
        true if and only if the values are considered equal
      Throws:
        `StreamBaseException`

Copyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.