public class GTIngredientList extends java.util.LinkedList<GTIngredient>
Red (tfeng) |
Yellow (tfeng) |
Constructor and Description |
---|
GTIngredientList(GTIngredientsAttribute owner)
Construct an empty GTIngredientList contained by the given attribute.
|
GTIngredientList(GTIngredientsAttribute owner,
GTIngredient... ingredients)
Construct a GTIngredientList contained by the given attribute with some
initial ingredients.
|
GTIngredientList(GTIngredientsAttribute owner,
GTIngredientList template)
Construct a GTIngredientList contained by the given attribute, and add
all the ingredients in the template to this one.
|
Modifier and Type | Method and 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.
|
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
equals, hashCode, listIterator, removeRange, subList
containsAll, isEmpty, removeAll, retainAll
finalize, getClass, notify, notifyAll, wait, wait, wait
public GTIngredientList(GTIngredientsAttribute owner)
owner
- The attribute that contains this list of ingredients.public GTIngredientList(GTIngredientsAttribute owner, GTIngredient... ingredients)
owner
- The attribute that contains this list of ingredients.ingredients
- The initial ingredients, which should be all criteria
or all operations.public GTIngredientList(GTIngredientsAttribute owner, GTIngredientList template)
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.public GTIngredientsAttribute getOwner()
public static GTIngredientList parse(GTIngredientsAttribute owner, java.lang.String expression) throws MalformedStringException
owner
- The attribute that contains the constructed list.expression
- The expression to parse.MalformedStringException
- If the expression is malformed.public java.lang.String toString()
toString
in class java.util.AbstractCollection<GTIngredient>
public void validate() throws ValidationException
ValidationException
- If some ingredients are invalid.