Class Tuple<E>

  • Type Parameters:
    E - Type of the elements in this tuple.
    All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.Deque<E>, java.util.List<E>, java.util.Queue<E>
    Direct Known Subclasses:
    Pair

    public class Tuple<E>
    extends java.util.LinkedList<E>
    Generic tuple data structure.
    Since:
    Ptolemy II 8.0
    Version:
    $Id$
    Author:
    Thomas Huining Feng
    See Also:
    Serialized Form
    Pt.AcceptedRating:
    Red (tfeng)
    Pt.ProposedRating:
    Yellow (tfeng)
    • Field Summary

      • Fields inherited from class java.util.AbstractList

        modCount
    • Constructor Summary

      Constructors 
      Constructor Description
      Tuple​(E... elements)
      Construct a tuple with all the given elements.
      Tuple​(java.util.Collection<E> collection)
      Construct a tuple containing all the elements of the given collection.
    • Method Summary

      • Methods inherited from class java.util.LinkedList

        add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, spliterator, toArray, toArray
      • Methods inherited from class java.util.AbstractSequentialList

        iterator
      • Methods inherited from class java.util.AbstractList

        equals, hashCode, listIterator, removeRange, subList
      • Methods inherited from class java.util.AbstractCollection

        containsAll, isEmpty, removeAll, retainAll, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.util.Deque

        iterator
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, replaceAll, retainAll, sort, subList
    • Constructor Detail

      • Tuple

        public Tuple​(java.util.Collection<E> collection)
        Construct a tuple containing all the elements of the given collection.
        Parameters:
        collection - The collection.
      • Tuple

        public Tuple​(E... elements)
        Construct a tuple with all the given elements.
        Parameters:
        elements - The elements.