Package org.apache.datasketches.quantiles

# Class DoublesSketchIterator

java.lang.Object
org.apache.datasketches.quantiles.DoublesSketchIterator

All Implemented Interfaces:
  `QuantilesDoublesSketchIterator`, `QuantilesSketchIterator`

public final class DoublesSketchIterator extends Object implements QuantilesDoublesSketchIterator
Iterator over DoublesSketch. The order is not defined.

## Method Summary

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

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### getQuantile

public double getQuantile()
Description copied from interface: `QuantilesDoublesSketchIterator`
Gets the double quantile at the current index.

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

Specified by:
  `getQuantile` in interface `QuantilesDoublesSketchIterator`
Returns:
  the double quantile at the current index.

### getWeight

public long getWeight()
Description copied from interface: `QuantilesSketchIterator`
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().

Specified by:
  `getWeight` in interface `QuantilesSketchIterator`
Returns:
  the natural weight at the current index.

### next

public boolean next()
Description copied from interface: `QuantilesSketchIterator`
Advances the index and checks if it is valid. The state of this iterator is undefined before the first call of this method.

Specified by:
  `next` in interface `QuantilesSketchIterator`
Returns:
  true if the next index is valid.