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 (package private) static VectorCoder<byte[]>BYTE_ARRAYAn encoder/decoder ofList<byte[]>.private S2Coder<T>coderstatic 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.(package private) static VectorCoder<java.lang.String>STRINGAn encoder/decoder ofList<String>.
-
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 java.util.List<T>decode(PrimitiveArrays.Bytes data, PrimitiveArrays.Cursor cursor)voidencode(java.util.List<T> values, java.io.OutputStream output)Encodesvaluetooutput.
-
-
-
Field Detail
-
BYTE_ARRAY
static final VectorCoder<byte[]> BYTE_ARRAY
An encoder/decoder ofList<byte[]>.
-
STRING
static final VectorCoder<java.lang.String> STRING
An encoder/decoder ofList<String>.
-
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(java.util.List<T> values, java.io.OutputStream output) throws java.io.IOException
Description copied from interface:S2CoderEncodesvaluetooutput.
-
decode
public java.util.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.
-
-