Interface PeekableCharIterator

All Superinterfaces:
CharIterator, Cloneable
All Known Subinterfaces:
PeekableCharRankIterator

public interface PeekableCharIterator extends CharIterator
Simple extension to the CharIterator interface
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    advanceIfNeeded(char thresholdVal)
    If needed, when iterating forward through the chars it will advance as long as the next value is smaller than val (as an unsigned short) when iterating in reverse through the chars it will advance as long as the next value is larger than val (as an unsigned short)
    Creates a copy of the iterator.
    char
    Look at the next value without advancing

    Methods inherited from interface org.roaringbitmap.CharIterator

    hasNext, next, nextAsInt, remove
  • Method Details

    • advanceIfNeeded

      void advanceIfNeeded(char thresholdVal)
      If needed, when iterating forward through the chars it will advance as long as the next value is smaller than val (as an unsigned short) when iterating in reverse through the chars it will advance as long as the next value is larger than val (as an unsigned short)
      Parameters:
      thresholdVal - threshold
    • peekNext

      char peekNext()
      Look at the next value without advancing
      Returns:
      next value
    • clone

      Creates a copy of the iterator.
      Specified by:
      clone in interface CharIterator
      Returns:
      a clone of the current iterator