T - the type of the elements of the Lists being transcodedpublic class ListCoder<T> extends IterableLikeCoder<T,java.util.List<T>>
Coder.Context, Coder.NonDeterministicException| Modifier and Type | Method and Description |
|---|---|
protected java.util.List<T> |
decodeToIterable(java.util.List<T> decodedElements)
Builds an instance of the coder's associated
Iterable from a list
of decoded elements. |
static <T> java.util.List<java.lang.Object> |
getInstanceComponents(java.util.List<T> exampleValue)
Returns the first element in this list if it is non-empty,
otherwise returns
null. |
boolean |
isDeterministic()
Deprecated.
|
static <T> ListCoder<T> |
of(Coder<T> elemCoder) |
static ListCoder<?> |
of(java.util.List<Coder<?>> components) |
void |
verifyDeterministic()
Throw
Coder.NonDeterministicException if the coding is not deterministic. |
decode, encode, getCoderArguments, getElemCoder, getInstanceComponentsHelper, isRegisterByteSizeObserverCheap, registerByteSizeObserverasCloudObject, equals, getComponents, getEncodedElementByteSize, hashCode, toString, verifyDeterministic, verifyDeterministicprotected final java.util.List<T> decodeToIterable(java.util.List<T> decodedElements)
IterableLikeCoderIterable from a list
of decoded elements. If IT is a supertype of List<T>, the
derived class implementation is permitted to return decodedElements
directly.decodeToIterable in class IterableLikeCoder<T,java.util.List<T>>public static <T> java.util.List<java.lang.Object> getInstanceComponents(java.util.List<T> exampleValue)
null.@Deprecated public boolean isDeterministic()
isDeterministic in interface Coder<java.util.List<T>>isDeterministic in class IterableLikeCoder<T,java.util.List<T>>public void verifyDeterministic()
throws Coder.NonDeterministicException
CoderCoder.NonDeterministicException if the coding is not deterministic.
In order for a Coder to be considered deterministic,
the following must be true:
Object.equals()
or Comparable.compareTo(), if supported), have the same
encoding.
Coder always produces a canonical encoding, which is the
same for an instance of an object even if produced on different
computers at different times.
verifyDeterministic in interface Coder<java.util.List<T>>verifyDeterministic in class IterableLikeCoder<T,java.util.List<T>>Coder.NonDeterministicException - if this coder is not deterministic.