Package org.apache.storm.trident.operation.builtin

# Class MinWithComparator<T>

java.lang.Object
org.apache.storm.trident.operation.BaseOperation
org.apache.storm.trident.operation.BaseAggregator<ComparisonAggregator.State>
org.apache.storm.trident.operation.builtin.ComparisonAggregator<T>
org.apache.storm.trident.operation.builtin.MinWithComparator<T>

All Implemented Interfaces:
  `Serializable`, `Aggregator<ComparisonAggregator.State>`, `Operation`

public class MinWithComparator<T> extends ComparisonAggregator<T>
This aggregator computes the minimum of aggregated tuples in a stream. It uses given @{code comparator} for comparing two values in a stream.

See Also:
  - Serialized Form

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.apache.storm.trident.operation.builtin.ComparisonAggregator

  `ComparisonAggregator.State`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MinWithComparator(String inputFieldName, Comparator<T> comparator)`
  `MinWithComparator(Comparator<T> comparator)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected T`
  `compare(T value1, T value2)`
  `String`
  `toString()`

  ### Methods inherited from class org.apache.storm.trident.operation.builtin.ComparisonAggregator

  `aggregate, complete, init, valueFromTuple`

  ### Methods inherited from class org.apache.storm.trident.operation.BaseOperation

  `cleanup, prepare`

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

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

  ### Methods inherited from interface org.apache.storm.trident.operation.Operation

  `cleanup, prepare`

- ## Constructor Details

  - ### MinWithComparator

    public MinWithComparator(String inputFieldName, Comparator<T> comparator)

  - ### MinWithComparator

    public MinWithComparator(Comparator<T> comparator)

- ## Method Details

  - ### compare

    protected T compare(T value1, T value2)
    Specified by:
      `compare` in class `ComparisonAggregator<T>`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`