Package com.google.common.geometry
Class S2LaxPolygonShape.Coder
- java.lang.Object
-
- com.google.common.geometry.S2LaxPolygonShape.Coder
-
- All Implemented Interfaces:
S2Coder<S2LaxPolygonShape>
- Enclosing interface:
- S2LaxPolygonShape
@GwtIncompatible("Uses ByteBuffer") public static class S2LaxPolygonShape.Coder extends java.lang.Object implements S2Coder<S2LaxPolygonShape>
An encoder/decoder ofS2LaxPolygonShape
s.
-
-
Field Summary
Fields Modifier and Type Field Description private S2Coder<java.util.List<S2Point>>
coder
(package private) static S2LaxPolygonShape.Coder
COMPACT
An instance ofS2LaxPolygonShape.Coder
which encodes/decodesS2LaxPolygonShape
s in theCOMPACT
format.(package private) static S2LaxPolygonShape.Coder
FAST
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description S2LaxPolygonShape
decode(PrimitiveArrays.Bytes data, PrimitiveArrays.Cursor cursor)
void
encode(S2LaxPolygonShape shape, java.io.OutputStream output)
Encodesvalue
tooutput
.
-
-
-
Field Detail
-
FAST
static final S2LaxPolygonShape.Coder FAST
-
COMPACT
static final S2LaxPolygonShape.Coder COMPACT
An instance ofS2LaxPolygonShape.Coder
which encodes/decodesS2LaxPolygonShape
s in theCOMPACT
format.
-
-
Method Detail
-
encode
public void encode(S2LaxPolygonShape shape, java.io.OutputStream output) throws java.io.IOException
Description copied from interface:S2Coder
Encodesvalue
tooutput
.- Specified by:
encode
in interfaceS2Coder<S2LaxPolygonShape>
- Throws:
java.io.IOException
-
decode
public S2LaxPolygonShape decode(PrimitiveArrays.Bytes data, PrimitiveArrays.Cursor cursor)
Description copied from interface:S2Coder
Decodes a value of typeS2Coder
fromdata
starting atcursor.position
.cursor.position
is updated to the position of the first byte indata
following the encoded value.- Specified by:
decode
in interfaceS2Coder<S2LaxPolygonShape>
-
-