T - The Java array type this codec handlespublic abstract class AbstractArrayCodec<T>
extends com.datastax.driver.core.TypeCodec<T>
com.datastax.driver.core.TypeCodec.AbstractCollectionCodec<E,C extends Collection<E>>, com.datastax.driver.core.TypeCodec.AbstractMapCodec<K,V>, com.datastax.driver.core.TypeCodec.AbstractTupleCodec<T>, com.datastax.driver.core.TypeCodec.AbstractUDTCodec<T>, com.datastax.driver.core.TypeCodec.PrimitiveBooleanCodec, com.datastax.driver.core.TypeCodec.PrimitiveByteCodec, com.datastax.driver.core.TypeCodec.PrimitiveDoubleCodec, com.datastax.driver.core.TypeCodec.PrimitiveFloatCodec, com.datastax.driver.core.TypeCodec.PrimitiveIntCodec, com.datastax.driver.core.TypeCodec.PrimitiveLongCodec, com.datastax.driver.core.TypeCodec.PrimitiveShortCodec| Constructor and Description |
|---|
AbstractArrayCodec(com.datastax.driver.core.DataType.CollectionType cqlType,
Class<T> javaClass) |
| Modifier and Type | Method and Description |
|---|---|
String |
format(T array) |
protected abstract void |
formatElement(StringBuilder output,
T array,
int index)
Format the
indexth element of array to output. |
protected abstract T |
newInstance(int size)
Create a new array instance with the given size.
|
T |
parse(String value) |
protected abstract void |
parseElement(String input,
T array,
int index)
Parse the
indexth element of array from input. |
accepts, accepts, accepts, accepts, ascii, bigint, blob, cboolean, cdouble, cfloat, cint, counter, custom, date, decimal, deserialize, getCqlType, getJavaType, inet, list, map, serialize, set, smallInt, time, timestamp, timeUUID, tinyInt, toString, tuple, userType, uuid, varchar, varintpublic String format(T array) throws com.datastax.driver.core.exceptions.InvalidTypeException
format in class com.datastax.driver.core.TypeCodec<T>com.datastax.driver.core.exceptions.InvalidTypeExceptionpublic T parse(String value) throws com.datastax.driver.core.exceptions.InvalidTypeException
parse in class com.datastax.driver.core.TypeCodec<T>com.datastax.driver.core.exceptions.InvalidTypeExceptionprotected abstract T newInstance(int size)
size - The size of the array to instantiate.protected abstract void formatElement(StringBuilder output, T array, int index)
indexth element of array to output.output - The StringBuilder to write to.array - The array to read from.index - The element index.Copyright © 2012–2018. All rights reserved.