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>>

An `IterableCoder` encodes any `Iterable` in the format of `IterableLikeCoder`.

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
`protected` `IterableCoder(Coder<T> elemCoder)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`com.google.cloud.dataflow.sdk.util.CloudObject` `asCloudObject()` Returns the `CloudObject` that represents this `Coder`.
`protected Iterable<T>` `decodeToIterable(List<T> decodedElements)` Builds an instance of `IterableT`, this coder's associated `Iterable`-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 returns `null`.
`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`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### IterableCoder

    protected IterableCoder(Coder<T> elemCoder)

### 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 of `IterableT`, this coder's associated `Iterable`-like subtype, from a list of decoded elements.

Specified by:
  `decodeToIterable` in class `IterableLikeCoder<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 returns `null`.

#### asCloudObject

    public com.google.cloud.dataflow.sdk.util.CloudObject asCloudObject()

Description copied from interface: `Coder`
Returns the `CloudObject` that represents this `Coder`.

Specified by:
  `asCloudObject` in interface `Coder<Iterable<T>>`
Overrides:
  `asCloudObject` in class `StandardCoder<Iterable<T>>`