com.google.cloud.dataflow.sdk.transforms.join

## Class KeyedPCollectionTuple<K>

- java.lang.Object
- - com.google.cloud.dataflow.sdk.transforms.join.KeyedPCollectionTuple<K>

Type Parameters:
  `K` - the type of key shared by all constituent PCollections

All Implemented Interfaces:
  PInput

    public class KeyedPCollectionTuple<K>
    extends Object
    implements PInput

An immutable tuple of keyed `PCollections` with key type K. (`PCollections` containing values of type `KV<K, ?>`)

### Nested Class Summary

Nested Classes
`static class` `KeyedPCollectionTuple.TaggedKeyedPCollection<K,V>` A utility class to help ensure coherence of tag and input PCollection types.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`<V> KeyedPCollectionTuple<K>` `and(TupleTag<V> tag, PCollection<KV<K,V>> pc)` Returns a new `KeyedPCollectionTuple<K>` that is the same as this, appended with the given PCollection.
`<OutputT extends POutput> OutputT` `apply(PTransform<KeyedPCollectionTuple<K>,OutputT> transform)` Like `apply(String, PTransform)` but defaulting to the name provided by the `PTransform`.
`<OutputT extends POutput> OutputT` `apply(String name, PTransform<KeyedPCollectionTuple<K>,OutputT> transform)` Applies the given `PTransform` to this input `KeyedPCollectionTuple` and returns its `OutputT`.
`static <K> KeyedPCollectionTuple<K>` `empty(Pipeline pipeline)` Returns an empty `KeyedPCollectionTuple<K>` on the given pipeline.
`Collection<? extends PValue>` `expand()` Expands the component `PCollections`, stripping off any tag-specific information.
`void` `finishSpecifying()` After building, finalizes this `PInput` to make it ready for being used as an input to a `PTransform`.
`CoGbkResultSchema` `getCoGbkResultSchema()` Returns the `CoGbkResultSchema` associated with this `KeyedPCollectionTuple`.
`Coder<K>` `getKeyCoder()` Returns the key `Coder` for all `PCollections` in this `KeyedPCollectionTuple`.
`List<KeyedPCollectionTuple.TaggedKeyedPCollection<K,?>>` `getKeyedCollections()` Returns a list of `TaggedKeyedPCollections` for the `PCollections` contained in this `KeyedPCollectionTuple`.
`Pipeline` `getPipeline()` Returns the owning `Pipeline` of this `PInput`.
`boolean` `isEmpty()`
`static <K,InputT> KeyedPCollectionTuple<K>` `of(TupleTag<InputT> tag, PCollection<KV<K,InputT>> pc)` Returns a new `KeyedPCollectionTuple<K>` with the given tag and initial PCollection.

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### empty

    public static <K> KeyedPCollectionTuple<K> empty(Pipeline pipeline)

Returns an empty `KeyedPCollectionTuple<K>` on the given pipeline.

#### of

    public static <K,InputT> KeyedPCollectionTuple<K> of(TupleTag<InputT> tag,
                                                         PCollection<KV<K,InputT>> pc)

Returns a new `KeyedPCollectionTuple<K>` with the given tag and initial PCollection.

#### and

    public <V> KeyedPCollectionTuple<K> and(TupleTag<V> tag,
                                            PCollection<KV<K,V>> pc)

Returns a new `KeyedPCollectionTuple<K>` that is the same as this, appended with the given PCollection.

#### isEmpty

    public boolean isEmpty()

#### getKeyedCollections

    public List<KeyedPCollectionTuple.TaggedKeyedPCollection<K,?>> getKeyedCollections()

Returns a list of `TaggedKeyedPCollections` for the `PCollections` contained in this `KeyedPCollectionTuple`.

#### apply

    public <OutputT extends POutput> OutputT apply(PTransform<KeyedPCollectionTuple<K>,OutputT> transform)

Like `apply(String, PTransform)` but defaulting to the name provided by the `PTransform`.

#### apply

    public <OutputT extends POutput> OutputT apply(String name,
                                                   PTransform<KeyedPCollectionTuple<K>,OutputT> transform)

Applies the given `PTransform` to this input `KeyedPCollectionTuple` and returns its `OutputT`. This uses `name` to identify the specific application of the transform. This name is used in various places, including the monitoring UI, logging, and to stably identify this application node in the job graph.

#### expand

    public Collection<? extends PValue> expand()

Expands the component `PCollections`, stripping off any tag-specific information.

Specified by:
  `expand` in interface `PInput`

#### getKeyCoder

    public Coder<K> getKeyCoder()

Returns the key `Coder` for all `PCollections` in this `KeyedPCollectionTuple`.

#### getCoGbkResultSchema

    public CoGbkResultSchema getCoGbkResultSchema()

Returns the `CoGbkResultSchema` associated with this `KeyedPCollectionTuple`.

#### getPipeline

    public Pipeline getPipeline()

Description copied from interface: `PInput`
Returns the owning `Pipeline` of this `PInput`.

Specified by:
  `getPipeline` in interface `PInput`

#### finishSpecifying

    public void finishSpecifying()

Description copied from interface: `PInput`

After building, finalizes this `PInput` to make it ready for being used as an input to a `PTransform`.

Automatically invoked whenever `apply()` is invoked on this `PInput`, so users do not normally call this explicitly.

Specified by:
  `finishSpecifying` in interface `PInput`