Class BitmapContainerCharIterator

java.lang.Object
org.roaringbitmap.BitmapContainerCharIterator
All Implemented Interfaces:
Cloneable, CharIterator, PeekableCharIterator
Direct Known Subclasses:
BitmapContainerCharRankIterator

class BitmapContainerCharIterator extends Object implements PeekableCharIterator
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) long[]
     
    (package private) long
     
    (package private) int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    advanceIfNeeded(char minval)
    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.
    boolean
     
    char
     
    int
     
    char
    Look at the next value without advancing
    void
    If possible, remove the current value
    void
    wrap(long[] b)
     

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • w

      long w
    • x

      int x
    • bitmap

      long[] bitmap
  • Constructor Details

    • BitmapContainerCharIterator

      BitmapContainerCharIterator()
    • BitmapContainerCharIterator

      BitmapContainerCharIterator(long[] p)
  • Method Details

    • clone

      public PeekableCharIterator clone()
      Description copied from interface: PeekableCharIterator
      Creates a copy of the iterator.
      Specified by:
      clone in interface CharIterator
      Specified by:
      clone in interface PeekableCharIterator
      Overrides:
      clone in class Object
      Returns:
      a clone of the current iterator
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface CharIterator
      Returns:
      whether there is another value
    • next

      public char next()
      Specified by:
      next in interface CharIterator
      Returns:
      next char value
    • nextAsInt

      public int nextAsInt()
      Specified by:
      nextAsInt in interface CharIterator
      Returns:
      next short value as int value (using the least significant 16 bits)
    • remove

      public void remove()
      Description copied from interface: CharIterator
      If possible, remove the current value
      Specified by:
      remove in interface CharIterator
    • wrap

      public void wrap(long[] b)
    • advanceIfNeeded

      public void advanceIfNeeded(char minval)
      Description copied from interface: PeekableCharIterator
      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)
      Specified by:
      advanceIfNeeded in interface PeekableCharIterator
      Parameters:
      minval - threshold
    • peekNext

      public char peekNext()
      Description copied from interface: PeekableCharIterator
      Look at the next value without advancing
      Specified by:
      peekNext in interface PeekableCharIterator
      Returns:
      next value