Class S2CellIndex.CellIterator

java.lang.Object
com.google.common.geometry.S2CellIndex.CellIterator
Enclosing class:
S2CellIndex

public final class S2CellIndex.CellIterator extends Object
An iterator over all (cellId, label) pairs in an unspecified order.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Current node pointed to by 'offset', or null if done().
    private int
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the S2CellId of the current (cellId, label) pair.
    boolean
    Returns true if all (cellId, label) pairs have been visited.
    int
    Returns the label of the current (cellId, label) pair.
    void
    Advances this iterator to the next (cellId, label) pair.
    private void
    seek(int offset)
    Sets the offset and sets 'cell' accordingly.

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • CellIterator

      private CellIterator()
  • Method Details

    • cellId

      public S2CellId cellId()
      Returns the S2CellId of the current (cellId, label) pair.
    • label

      public int label()
      Returns the label of the current (cellId, label) pair.
    • done

      public boolean done()
      Returns true if all (cellId, label) pairs have been visited.
    • next

      public void next()
      Advances this iterator to the next (cellId, label) pair.
    • seek

      private void seek(int offset)
      Sets the offset and sets 'cell' accordingly.