Package com.google.common.geometry
Class VectorCoder<T>
java.lang.Object
com.google.common.geometry.VectorCoder<T>
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final VectorCoder<byte[]> An encoder/decoder ofList<byte[]>.static final VectorCoder<S2Shape> An encoder/decoder ofS2Shapes, where the shapes use theS2TaggedShapeCoder.COMPACTencoding.static final VectorCoder<S2Shape> An encoder/decoder ofS2Shapes, where the shapes use theS2TaggedShapeCoder.FASTencoding.(package private) static final VectorCoder<String> An encoder/decoder ofList<String>. -
Constructor Summary
ConstructorsConstructorDescriptionVectorCoder(S2Coder<T> coder) Constructs aVectorCoderwhich encodes/decodes elements with the givencoder. -
Method Summary
Modifier and TypeMethodDescriptiondecode(PrimitiveArrays.Bytes data, PrimitiveArrays.Cursor cursor) voidencode(List<T> values, OutputStream output) Encodesvaluetooutput.
-
Field Details
-
BYTE_ARRAY
An encoder/decoder ofList<byte[]>. -
STRING
An encoder/decoder ofList<String>. -
FAST_SHAPE
An encoder/decoder ofS2Shapes, where the shapes use theS2TaggedShapeCoder.FASTencoding. -
COMPACT_SHAPE
An encoder/decoder ofS2Shapes, where the shapes use theS2TaggedShapeCoder.COMPACTencoding. -
coder
-
-
Constructor Details
-
VectorCoder
Constructs aVectorCoderwhich encodes/decodes elements with the givencoder.
-
-
Method Details
-
encode
Description copied from interface:S2CoderEncodesvaluetooutput.- Specified by:
encodein interfaceS2Coder<T>- Throws:
IOException
-
decode
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.
-