Package com.google.common.geometry
Class S2LaxPolylineShape.Coder
- java.lang.Object
-
- com.google.common.geometry.S2LaxPolylineShape.Coder
-
- All Implemented Interfaces:
S2Coder<S2LaxPolylineShape>
- Enclosing interface:
- S2LaxPolylineShape
@GwtIncompatible("Uses EncodedS2PointVector") public static class S2LaxPolylineShape.Coder extends java.lang.Object implements S2Coder<S2LaxPolylineShape>An encoder/decoder ofS2LaxPolylineShapes.
-
-
Field Summary
Fields Modifier and Type Field Description private S2Coder<java.util.List<S2Point>>coder(package private) static S2LaxPolylineShape.CoderCOMPACTAn instance ofS2LaxPolylineShape.Coderwhich encodes/decodesS2LaxPolylineShapes in theCOMPACTformat.(package private) static S2LaxPolylineShape.CoderFASTAn instance ofS2LaxPolylineShape.Coderwhich encodes/decodesS2LaxPolylineShapes in theFASTformat.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description S2LaxPolylineShapedecode(PrimitiveArrays.Bytes data, PrimitiveArrays.Cursor cursor)voidencode(S2LaxPolylineShape shape, java.io.OutputStream output)Encodesvaluetooutput.
-
-
-
Field Detail
-
FAST
static final S2LaxPolylineShape.Coder FAST
An instance ofS2LaxPolylineShape.Coderwhich encodes/decodesS2LaxPolylineShapes in theFASTformat.
-
COMPACT
static final S2LaxPolylineShape.Coder COMPACT
An instance ofS2LaxPolylineShape.Coderwhich encodes/decodesS2LaxPolylineShapes in theCOMPACTformat.
-
-
Method Detail
-
encode
public void encode(S2LaxPolylineShape shape, java.io.OutputStream output) throws java.io.IOException
Description copied from interface:S2CoderEncodesvaluetooutput.- Specified by:
encodein interfaceS2Coder<S2LaxPolylineShape>- Throws:
java.io.IOException
-
decode
public S2LaxPolylineShape decode(PrimitiveArrays.Bytes data, PrimitiveArrays.Cursor cursor)
Description copied from interface:S2CoderDecodes a value of typeS2Coderfromdatastarting atcursor.position.cursor.positionis updated to the position of the first byte indatafollowing the encoded value.- Specified by:
decodein interfaceS2Coder<S2LaxPolylineShape>
-
-