Class TupleTagList

  • All Implemented Interfaces:
    java.io.Serializable

    public class TupleTagList
    extends java.lang.Object
    implements java.io.Serializable
    A TupleTagList is an immutable list of heterogeneously typed TupleTags. A TupleTagList is used, for instance, to specify the tags of the additional 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