Class MinAndMax<T extends java.lang.Comparable<? super T>>

java.lang.Object
org.elasticsearch.search.sort.MinAndMax<T>
All Implemented Interfaces:
Writeable

public class MinAndMax<T extends java.lang.Comparable<? super T>>
extends java.lang.Object
implements Writeable
A class that encapsulates a minimum and a maximum, that are of the same type and Comparable.
  • Constructor Details

    • MinAndMax

      public MinAndMax​(T minValue, T maxValue)
    • MinAndMax

      public MinAndMax​(StreamInput in) throws java.io.IOException
      Throws:
      java.io.IOException
  • Method Details

    • writeTo

      public void writeTo​(StreamOutput out) throws java.io.IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      java.io.IOException
    • getMin

      public T getMin()
      Return the minimum value.
    • getMax

      public T getMax()
      Return the maximum value.
    • getComparator

      public static java.util.Comparator<MinAndMax<?>> getComparator​(SortOrder order)
      Return a Comparator for MinAndMax values according to the provided SortOrder.