com.google.cloud.dataflow.sdk.values

## Class TupleTagList

- java.lang.Object
- - com.google.cloud.dataflow.sdk.values.TupleTagList

All Implemented Interfaces:
  Serializable

    public class TupleTagList
    extends Object
    implements Serializable

A `TupleTagList` is an immutable list of heterogeneously typed `TupleTags`. A `TupleTagList` is used, for instance, to specify the tags of the side outputs of a `ParDo`.

A `TupleTagList` can be created and accessed like follows:

     TupleTag<String> tag1 = ...;
     TupleTag<Integer> tag2 = ...;
     TupleTag<Iterable<String>> tag3 = ...;

     // Create a TupleTagList with three TupleTags:
     TupleTagList tags = TupleTagList.of(tag1).and(tag2).and(tag3);

     // Create an empty TupleTagList:
     Pipeline p = ...;
     TupleTagList tags2 = TupleTagList.empty(p);

     // Get TupleTags out of a TupleTagList, by index (origin 0):
     TupleTag<?> tagX = tags.get(1);
     TupleTag<?> tagY = tags.get(0);
     TupleTag<?> tagZ = tags.get(2);

     // Get a list of all TupleTags in a TupleTagList:
     List<TupleTag<?>> allTags = tags.getAll();

See Also:
  Serialized Form

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`TupleTagList` `and(List<TupleTag<?>> tags)` Returns a new `TupleTagList` that has all the `TupleTags` of this `TupleTagList` plus the given `TupleTags` appended to the end, in order.
`TupleTagList` `and(TupleTag<?> tag)` Returns a new `TupleTagList` that has all the `TupleTags` of this `TupleTagList` plus the given `TupleTag` appended to the end.
`static TupleTagList` `empty()` Returns an empty `TupleTagList`.
`TupleTag<?>` `get(int index)` Returns the `TupleTag` at the given index (origin zero).
`List<TupleTag<?>>` `getAll()` Returns an immutable List of all the `TupleTags` in this `TupleTagList`.
`static TupleTagList` `of(List<TupleTag<?>> tags)` Returns a `TupleTagList` containing the given `TupleTags`, in order.
`static TupleTagList` `of(TupleTag<?> tag)` Returns a singleton `TupleTagList` containing the given `TupleTag`.
`int` `size()` Returns the number of TupleTags in this TupleTagList.

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

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

### Method Detail

#### empty

    public static TupleTagList empty()

Returns an empty `TupleTagList`.

Longer `TupleTagLists` can be created by calling `and(com.google.cloud.dataflow.sdk.values.TupleTag<?>)` on the result.

#### of

    public static TupleTagList of(TupleTag<?> tag)

Returns a singleton `TupleTagList` containing the given `TupleTag`.

Longer `TupleTagLists` can be created by calling `and(com.google.cloud.dataflow.sdk.values.TupleTag<?>)` on the result.

#### of

    public static TupleTagList of(List<TupleTag<?>> tags)

Returns a `TupleTagList` containing the given `TupleTags`, in order.

Longer `TupleTagLists` can be created by calling `and(com.google.cloud.dataflow.sdk.values.TupleTag<?>)` on the result.

#### and

    public TupleTagList and(TupleTag<?> tag)

Returns a new `TupleTagList` that has all the `TupleTags` of this `TupleTagList` plus the given `TupleTag` appended to the end.

#### and

    public TupleTagList and(List<TupleTag<?>> tags)

Returns a new `TupleTagList` that has all the `TupleTags` of this `TupleTagList` plus the given `TupleTags` appended to the end, in order.

#### size

    public int size()

Returns the number of TupleTags in this TupleTagList.

#### get

    public TupleTag<?> get(int index)

Returns the `TupleTag` at the given index (origin zero).

Throws:
  `IndexOutOfBoundsException` - if the index is out of the range `[0..size()-1]`.

#### getAll

    public List<TupleTag<?>> getAll()

Returns an immutable List of all the `TupleTags` in this `TupleTagList`.