Class QuantilesItemsSketchIterator<T>
java.lang.Object
org.apache.datasketches.quantiles.QuantilesItemsSketchIterator<T>
- Type Parameters:
T- type of item
- All Implemented Interfaces:
QuantilesGenericSketchIteratorAPI<T>, QuantilesSketchIteratorAPI
public final class QuantilesItemsSketchIterator<T>
extends Object
implements QuantilesGenericSketchIteratorAPI<T>
Iterator over QuantilesItemsSketch. The order is not defined.
-
Method Summary
Modifier and TypeMethodDescriptionGets the generic quantile at the current index.longGets the natural weight at the current index.booleannext()Advances the index and checks if it is valid.
-
Method Details
-
getQuantile
Description copied from interface:QuantilesGenericSketchIteratorAPIGets the generic quantile at the current index.Don't call this before calling next() for the first time or after getting false from next().
- Specified by:
getQuantilein interfaceQuantilesGenericSketchIteratorAPI<T>- Returns:
- the generic quantile at the current index.
-
getWeight
public long getWeight()Description copied from interface:QuantilesSketchIteratorAPIGets the natural weight at the current index.Don't call this before calling next() for the first time or after getting false from next().
- Specified by:
getWeightin interfaceQuantilesSketchIteratorAPI- Returns:
- the natural weight at the current index.
-
next
public boolean next()Description copied from interface:QuantilesSketchIteratorAPIAdvances the index and checks if it is valid. The state of this iterator is undefined before the first call of this method.- Specified by:
nextin interfaceQuantilesSketchIteratorAPI- Returns:
- true if the next index is valid.
-