Class TupleSketchIterator<S extends Summary>

  • Type Parameters:
    S - Type of Summary

    public class TupleSketchIterator<S extends Summary>
    extends Object
    Iterator over a generic tuple sketch
    • 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!)