cascading.tuple

## Class TupleListCollector

- java.lang.Object
- - cascading.tuple.TupleEntryCollector
  - - cascading.tuple.TupleListCollector

- All Implemented Interfaces:
    java.lang.Iterable<Tuple>

      public class TupleListCollector
      extends TupleEntryCollector
      implements java.lang.Iterable<Tuple>

  TupleEntryCollector is a convenience class for managing a list of tuples. More specifically it can simultaneously append and modify in place elements of the list through the use of a ListIterator.

- - ### Field Summary

    - ### Fields inherited from class cascading.tuple.TupleEntryCollector

      `tupleEntry`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TupleListCollector(Fields fields, boolean copyTupleOnCollect)` Constructor TupleListCollector creates a new TupleListCollector instance.
    `TupleListCollector(Fields fields, Tuple... tuple)` Constructor TupleEntryCollector creates a new TupleEntryCollector instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Method clear clears all Tuple instances from this instance.
    `protected void` | `collect(TupleEntry tupleEntry)`
    `java.util.Iterator<TupleEntry>` | `entryIterator()` Method entryIterator return a TupleEntry iterator for this collection.
    `boolean` | `isEmpty()` Method isEmpty returns true if this collection is empty.
    `java.util.Iterator<Tuple>` | `iterator()` Method iterator returns an iterator for this collection.
    `int` | `size()` Returns the size of this collection.

    - ### Methods inherited from class cascading.tuple.TupleEntryCollector

      `add, add, close, setFields`

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

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

- - ### Constructor Detail

    - #### TupleListCollector

          public TupleListCollector(Fields fields,
                            Tuple... tuple)

      Constructor TupleEntryCollector creates a new TupleEntryCollector instance.
      Parameters:
        `fields` - of type Fields
        `tuple` - of type Tuple...

    - #### TupleListCollector

          public TupleListCollector(Fields fields,
                            boolean copyTupleOnCollect)

      Constructor TupleListCollector creates a new TupleListCollector instance.

      Set copyTupleOnCollect to `true` if a new Tuple instance should be stored in the underlying list.
      Parameters:
        `fields` - of type Fields
        `copyTupleOnCollect` - of type boolean

  - ### Method Detail

    - #### collect

          protected void collect(TupleEntry tupleEntry)

      Specified by:
        `collect` in class `TupleEntryCollector`

    - #### isEmpty

          public boolean isEmpty()

      Method isEmpty returns true if this collection is empty.
      Returns:
        the empty (type boolean) of this TupleCollector object.

    - #### clear

          public void clear()

      Method clear clears all Tuple instances from this instance.

    - #### size

          public int size()

      Returns the size of this collection.
      Returns:
        int

    - #### iterator

          public java.util.Iterator<Tuple> iterator()

      Method iterator returns an iterator for this collection.
      Specified by:
        `iterator` in interface `java.lang.Iterable<Tuple>`
      Returns:
        Iterator

    - #### entryIterator

          public java.util.Iterator<TupleEntry> entryIterator()

      Method entryIterator return a TupleEntry iterator for this collection. Note the same TupleEntry will be returned on each next() call.
      Returns:
        Iterator

Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.