Class TDigestToExponentialHistogramConverter.ArrayBasedCentroidIterator
java.lang.Object
org.elasticsearch.exponentialhistogram.TDigestToExponentialHistogramConverter.ArrayBasedCentroidIterator
- All Implemented Interfaces:
TDigestToExponentialHistogramConverter.CentroidIterator
- Enclosing class:
TDigestToExponentialHistogramConverter
public static class TDigestToExponentialHistogramConverter.ArrayBasedCentroidIterator
extends Object
implements TDigestToExponentialHistogramConverter.CentroidIterator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadvance()Advance to the next centroid.longcount()Must only be called ifTDigestToExponentialHistogramConverter.CentroidIterator.hasNext()returned true.booleanhasNext()Creates a copy of this iterator that iterates over the centroids this iterator already skipped viaTDigestToExponentialHistogramConverter.CentroidIterator.advance(), but in reverse order.doublevalue()Must only be called ifTDigestToExponentialHistogramConverter.CentroidIterator.hasNext()returned true.
-
Constructor Details
-
ArrayBasedCentroidIterator
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceTDigestToExponentialHistogramConverter.CentroidIterator- Returns:
- true if there is another centroid to process
-
value
public double value()Description copied from interface:TDigestToExponentialHistogramConverter.CentroidIteratorMust only be called ifTDigestToExponentialHistogramConverter.CentroidIterator.hasNext()returned true.- Specified by:
valuein interfaceTDigestToExponentialHistogramConverter.CentroidIterator- Returns:
- the current centroid's value
-
count
public long count()Description copied from interface:TDigestToExponentialHistogramConverter.CentroidIteratorMust only be called ifTDigestToExponentialHistogramConverter.CentroidIterator.hasNext()returned true.- Specified by:
countin interfaceTDigestToExponentialHistogramConverter.CentroidIterator- Returns:
- the current centroid's count
-
advance
public void advance()Description copied from interface:TDigestToExponentialHistogramConverter.CentroidIteratorAdvance to the next centroid.- Specified by:
advancein interfaceTDigestToExponentialHistogramConverter.CentroidIterator
-
reversedCopy
Description copied from interface:TDigestToExponentialHistogramConverter.CentroidIteratorCreates a copy of this iterator that iterates over the centroids this iterator already skipped viaTDigestToExponentialHistogramConverter.CentroidIterator.advance(), but in reverse order.- Specified by:
reversedCopyin interfaceTDigestToExponentialHistogramConverter.CentroidIterator
-