Package com.google.common.geometry
Class S2CellIndex.CellIterator
- java.lang.Object
-
- com.google.common.geometry.S2CellIndex.CellIterator
-
- Enclosing class:
- S2CellIndex
public final class S2CellIndex.CellIterator extends java.lang.ObjectAn iterator over all (cellId, label) pairs in an unspecified order.
-
-
Field Summary
Fields Modifier and Type Field Description private S2CellIndex.CellNodecellCurrent node pointed to by 'offset', or null ifdone().private intoffsetOffset intoS2CellIndex.cellNodes.
-
Constructor Summary
Constructors Modifier Constructor Description privateCellIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description S2CellIdcellId()Returns the S2CellId of the current (cellId, label) pair.booleandone()Returns true if all (cellId, label) pairs have been visited.intlabel()Returns the label of the current (cellId, label) pair.voidnext()Advances this iterator to the next (cellId, label) pair.private voidseek(int offset)Sets the offset and sets 'cell' accordingly.
-
-
-
Field Detail
-
offset
private int offset
Offset intoS2CellIndex.cellNodes.
-
cell
private S2CellIndex.CellNode cell
Current node pointed to by 'offset', or null ifdone().
-
-
Method Detail
-
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.
-
-