Google Cloud Dataflow SDK for Java, version 1.9.1
com.google.cloud.dataflow.sdk.coders
Class IterableCoder<T>
- java.lang.Object
-
- com.google.cloud.dataflow.sdk.coders.StandardCoder<IterableT>
-
- com.google.cloud.dataflow.sdk.coders.IterableLikeCoder<T,Iterable<T>>
-
- com.google.cloud.dataflow.sdk.coders.IterableCoder<T>
-
- Type Parameters:
T
- the type of the elements of the iterables being transcoded
- All Implemented Interfaces:
- Coder<Iterable<T>>, Serializable
public class IterableCoder<T> extends IterableLikeCoder<T,Iterable<T>>
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.cloud.dataflow.sdk.coders.Coder
Coder.Context, Coder.NonDeterministicException
-
-
Constructor Summary
Constructors Modifier Constructor and Description protected
IterableCoder(Coder<T> elemCoder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description com.google.cloud.dataflow.sdk.util.CloudObject
asCloudObject()
Returns theCloudObject
that represents thisCoder
.protected Iterable<T>
decodeToIterable(List<T> decodedElements)
Builds an instance ofIterableT
, this coder's associatedIterable
-like subtype, from a list of decoded elements.static <T> List<Object>
getInstanceComponents(Iterable<T> exampleValue)
Returns the first element in this iterable if it is non-empty, otherwise returnsnull
.static <T> IterableCoder<T>
of(Coder<T> elemCoder)
static IterableCoder<?>
of(List<Coder<?>> components)
-
Methods inherited from class com.google.cloud.dataflow.sdk.coders.IterableLikeCoder
decode, encode, getCoderArguments, getElemCoder, getInstanceComponentsHelper, isRegisterByteSizeObserverCheap, registerByteSizeObserver, verifyDeterministic
-
Methods inherited from class com.google.cloud.dataflow.sdk.coders.StandardCoder
consistentWithEquals, equals, getAllowedEncodings, getComponents, getEncodedElementByteSize, getEncodingId, hashCode, structuralValue, toString, verifyDeterministic, verifyDeterministic
-
-
-
-
Method Detail
-
of
public static <T> IterableCoder<T> of(Coder<T> elemCoder)
-
decodeToIterable
protected final Iterable<T> decodeToIterable(List<T> decodedElements)
Description copied from class:IterableLikeCoder
Builds an instance ofIterableT
, this coder's associatedIterable
-like subtype, from a list of decoded elements.- Specified by:
decodeToIterable
in classIterableLikeCoder<T,Iterable<T>>
-
of
public static IterableCoder<?> of(List<Coder<?>> components)
-
getInstanceComponents
public static <T> List<Object> getInstanceComponents(Iterable<T> exampleValue)
Returns the first element in this iterable if it is non-empty, otherwise returnsnull
.
-
asCloudObject
public com.google.cloud.dataflow.sdk.util.CloudObject asCloudObject()
Description copied from interface:Coder
Returns theCloudObject
that represents thisCoder
.- Specified by:
asCloudObject
in interfaceCoder<Iterable<T>>
- Overrides:
asCloudObject
in classStandardCoder<Iterable<T>>
-
-