Package org.elasticsearch.search.sort
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
Comparable
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Constructor Summary
Constructors Constructor Description MinAndMax(StreamInput in)
-
Method Summary
Modifier and Type Method Description static java.util.Comparator<MinAndMax<?>>
getComparator(SortOrder order)
T
getMax()
Return the maximum value.T
getMin()
Return the minimum value.static <T extends java.lang.Comparable<? super T>>
MinAndMax<T>newMinMax(T min, T max)
void
writeTo(StreamOutput out)
Write this into the StreamOutput.
-
Constructor Details
-
MinAndMax
- Throws:
java.io.IOException
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput. -
getMin
Return the minimum value. -
getMax
Return the maximum value. -
newMinMax
-
getComparator
-