Class GTIngredientList

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<GTIngredient>, java.util.Collection<GTIngredient>, java.util.Deque<GTIngredient>, java.util.List<GTIngredient>, java.util.Queue<GTIngredient>

    public class GTIngredientList
    extends java.util.LinkedList<GTIngredient>
    A list of GTIngredients. Such a list is contained in a GTIngredientsAttribute, which is associated with special entities in a transformation rule, such as AtomicActorMatcher and CompositeActorMatcher. GTIngredients in this list are either all criteria or all operations.
    Since:
    Ptolemy II 7.1
    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
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      GTIngredientsAttribute getOwner()
      Get the GTIngredientsAttribute that contain this list.
      static GTIngredientList parse​(GTIngredientsAttribute owner, java.lang.String expression)
      Parse the given expression and construct a GTIngredientList in the given GTIngredientsAttribute.
      java.lang.String toString()
      Return a string that describes all the ingredients within this list.
      void validate()
      Check validity of the contained ingredients.
      • 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
      • 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

      • GTIngredientList

        public GTIngredientList​(GTIngredientsAttribute owner)
        Construct an empty GTIngredientList contained by the given attribute.
        Parameters:
        owner - The attribute that contains this list of ingredients.
      • GTIngredientList

        public GTIngredientList​(GTIngredientsAttribute owner,
                                GTIngredient... ingredients)
        Construct a GTIngredientList contained by the given attribute with some initial ingredients.
        Parameters:
        owner - The attribute that contains this list of ingredients.
        ingredients - The initial ingredients, which should be all criteria or all operations.
      • GTIngredientList

        public GTIngredientList​(GTIngredientsAttribute owner,
                                GTIngredientList template)
        Construct a GTIngredientList contained by the given attribute, and add all the ingredients in the template to this one.
        Parameters:
        owner - The attribute that contains this list of ingredients.
        template - Another GTIngredientList whose ingredients are to be added to this one. The references of those ingredients are copied. No cloning is done.
    • Method Detail

      • getOwner

        public GTIngredientsAttribute getOwner()
        Get the GTIngredientsAttribute that contain this list.
        Returns:
        The GTIngredientsAttribute that contain this list.
      • parse

        public static GTIngredientList parse​(GTIngredientsAttribute owner,
                                             java.lang.String expression)
                                      throws MalformedStringException
        Parse the given expression and construct a GTIngredientList in the given GTIngredientsAttribute.
        Parameters:
        owner - The attribute that contains the constructed list.
        expression - The expression to parse.
        Returns:
        The constructed list.
        Throws:
        MalformedStringException - If the expression is malformed.
      • toString

        public java.lang.String toString()
        Return a string that describes all the ingredients within this list.
        Overrides:
        toString in class java.util.AbstractCollection<GTIngredient>
        Returns:
        The string that describes all the ingredients within this list.