Package com.google.common.geometry
Class S2ShapeIndex.Cell.BinaryCell
- java.lang.Object
-
- com.google.common.geometry.S2ShapeIndex.Cell
-
- com.google.common.geometry.S2ShapeIndex.Cell.BinaryCell
-
- All Implemented Interfaces:
S2Iterator.Entry,java.io.Serializable
- Enclosing class:
- S2ShapeIndex.Cell
private static final class S2ShapeIndex.Cell.BinaryCell extends S2ShapeIndex.Cell
A specialization of Cell for the case of two clipped shapes. Also very common.
-
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUIDprivate S2ShapeIndex.S2ClippedShapeshape1private S2ShapeIndex.S2ClippedShapeshape2
-
Constructor Summary
Constructors Constructor Description BinaryCell(S2ShapeIndex.S2ClippedShape shape1, S2ShapeIndex.S2ClippedShape shape2)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description S2ShapeIndex.S2ClippedShapeclipped(int i)Returns the clipped shape at the given index.intnumShapes()Returns the number of clipped shapes in this cell.-
Methods inherited from class com.google.common.geometry.S2ShapeIndex.Cell
create, findClipped, id
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
shape1
private final S2ShapeIndex.S2ClippedShape shape1
-
shape2
private final S2ShapeIndex.S2ClippedShape shape2
-
-
Constructor Detail
-
BinaryCell
BinaryCell(S2ShapeIndex.S2ClippedShape shape1, S2ShapeIndex.S2ClippedShape shape2)
-
-
Method Detail
-
numShapes
public int numShapes()
Description copied from class:S2ShapeIndex.CellReturns the number of clipped shapes in this cell.- Specified by:
numShapesin classS2ShapeIndex.Cell
-
clipped
public S2ShapeIndex.S2ClippedShape clipped(int i)
Description copied from class:S2ShapeIndex.CellReturns the clipped shape at the given index.- Specified by:
clippedin classS2ShapeIndex.Cell- Parameters:
i- must be at least 0 and less thanS2ShapeIndex.Cell.numShapes()
-
-