# Class TupleSketchIterator<S extends Summary>

java.lang.Object
org.apache.datasketches.tuple.TupleSketchIterator<S>

Type Parameters:
  `S` - Type of Summary

public class TupleSketchIterator<S extends Summary> extends Object
Iterator over a generic tuple sketch

## Method Summary

Modifier and Type
Method
Description
`long`
`getHash()`
Gets the hash from the current entry in the sketch, which is a hash of the original key passed to update().
`S`
`getSummary()`
Gets a Summary object from the current entry in the sketch.
`boolean`
`next()`
Advancing the iterator and checking existence of the next entry is combined here for efficiency.

### Methods inherited from class Object

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

## Method Details

### next

public boolean next()
Advancing the iterator and checking existence of the next entry is combined here for efficiency. This results in an undefined state of the iterator before the first call of this method.

Returns:
  true if the next element exists

### getHash

public long getHash()
Gets the hash from the current entry in the sketch, which is a hash of the original key passed to update(). The original keys are not retained. Don't call this before calling next() for the first time or after getting false from next().

Returns:
  hash from the current entry

### getSummary

public S getSummary()
Gets a Summary object from the current entry in the sketch. Don't call this before calling next() for the first time or after getting false from next().

Returns:
  Summary object for the current entry (this is not a copy!)