Package org.apache.datasketches.tuple
Class TupleSketchIterator<S extends Summary>
- java.lang.Object
-
- org.apache.datasketches.tuple.TupleSketchIterator<S>
-
-
Method Summary
All Methods Instance Methods Concrete Methods 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.
-
-
-
Method Detail
-
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!)
-
-