T - the type of the elements of the Collections being transcodedpublic class CollectionCoder<T> extends IterableLikeCoder<T,java.util.Collection<T>>
Coder.Context, Coder.NonDeterministicException| Modifier | Constructor and Description |
|---|---|
protected |
CollectionCoder(Coder<T> elemCoder) |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Collection<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.Collection<T> exampleValue)
Returns the first element in this collection if it is non-empty,
otherwise returns
null. |
static <T> CollectionCoder<T> |
of(Coder<T> elemCoder) |
static CollectionCoder<?> |
of(java.util.List<java.lang.Object> components) |
decode, encode, getCoderArguments, getElemCoder, getInstanceComponentsHelper, isDeterministic, isRegisterByteSizeObserverCheap, registerByteSizeObserver, verifyDeterministicasCloudObject, equals, getComponents, getEncodedElementByteSize, hashCode, toString, verifyDeterministic, verifyDeterministicpublic static <T> CollectionCoder<T> of(Coder<T> elemCoder)
protected final java.util.Collection<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.Collection<T>>public static CollectionCoder<?> of(java.util.List<java.lang.Object> components)
public static <T> java.util.List<java.lang.Object> getInstanceComponents(java.util.Collection<T> exampleValue)
null.