Package org.apache.datasketches.quantilescommon

# Interface QuantilesSketchIterator

All Known Subinterfaces:
  `QuantilesDoublesSketchIterator`, `QuantilesFloatsSketchIterator`, `QuantilesGenericSketchIterator<T>`, `QuantilesLongsSketchIterator`

All Known Implementing Classes:
  `DoublesSketchIterator`, `ItemsSketchIterator`, `KllDoublesSketchIterator`, `KllFloatsSketchIterator`, `KllItemsSketchIterator`, `KllLongsSketchIterator`, `KllSketchIterator`, `ReqSketchIterator`

public interface QuantilesSketchIterator
This is the base interface for the SketchIterator hierarchy used for viewing the non-ordered quantiles retained by a sketch.

Prototype example of the recommended iteration loop:

       SketchIterator itr = sketch.iterator();
       while (itr.next()) {
         ...get*();
       }

Author:
  Lee Rhodes

## Method Summary

Modifier and Type
Method
Description
`long`
`getWeight()`
Gets the natural weight at the current index.
`boolean`
`next()`
Advances the index and checks if it is valid.

## Method Details

### getWeight

long getWeight()
Gets the natural weight at the current index.

Don't call this before calling next() for the first time or after getting false from next().

Returns:
  the natural weight at the current index.

### next

boolean next()
Advances the index and checks if it is valid. The state of this iterator is undefined before the first call of this method.

Returns:
  true if the next index is valid.