Package com.google.common.geometry
Class VectorCoder<T>
- java.lang.Object
-
- com.google.common.geometry.VectorCoder<T>
-
-
Field Summary
Fields Modifier and Type Field Description static VectorCoder<S2Shape>COMPACT_SHAPEAn encoder/decoder ofS2Shapes, where the shapes use theS2TaggedShapeCoder.COMPACTencoding.static VectorCoder<S2Shape>FAST_SHAPEAn encoder/decoder ofS2Shapes, where the shapes use theS2TaggedShapeCoder.FASTencoding.
-
Constructor Summary
Constructors Constructor Description VectorCoder(S2Coder<T> coder)Constructs aVectorCoderwhich encodes/decodes elements with the givencoder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<T>decode(PrimitiveArrays.Bytes data, PrimitiveArrays.Cursor cursor)voidencode(List<T> values, OutputStream output)Encodesvaluetooutput.
-
-
-
Field Detail
-
FAST_SHAPE
@GwtIncompatible("S2TaggedShapeCoder") public static final VectorCoder<S2Shape> FAST_SHAPEAn encoder/decoder ofS2Shapes, where the shapes use theS2TaggedShapeCoder.FASTencoding.
-
COMPACT_SHAPE
@GwtIncompatible("S2TaggedShapeCoder") public static final VectorCoder<S2Shape> COMPACT_SHAPEAn encoder/decoder ofS2Shapes, where the shapes use theS2TaggedShapeCoder.COMPACTencoding.
-
-
Method Detail
-
encode
public void encode(List<T> values, OutputStream output) throws IOException
Description copied from interface:S2CoderEncodesvaluetooutput.- Specified by:
encodein interfaceS2Coder<T>- Throws:
IOException
-
decode
public List<T> 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.
-
-