Package ptolemy.cg.lib.syntactic
Class SyntacticColumn
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.AbstractSequentialList<E>
-
- java.util.LinkedList<SyntacticTerm>
-
- ptolemy.cg.lib.syntactic.SyntacticTermList
-
- ptolemy.cg.lib.syntactic.SyntacticColumn
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<SyntacticTerm>
,java.util.Collection<SyntacticTerm>
,java.util.Deque<SyntacticTerm>
,java.util.List<SyntacticTerm>
,java.util.Queue<SyntacticTerm>
,SyntacticTerm
public class SyntacticColumn extends SyntacticTermList
Represent parallel composition in the context of Syntax terms. SyntacticTerm implementing objects can be put in parallel composition in this object which combines input and output ports of the constituent terms.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Chris Shaver
- See Also:
- Serialized Form
- Pt.AcceptedRating:
- red
- Pt.ProposedRating:
- red (shaver)
-
-
Field Summary
-
Fields inherited from class ptolemy.cg.lib.syntactic.SyntacticTermList
_inputs, _outputs, _rank
-
-
Constructor Summary
Constructors Constructor Description SyntacticColumn()
Create new empty Syntactic Column.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
doesFollow(SyntacticTerm node)
Decide if given node follows completely from this column.java.lang.String
generateCode()
Generate code for the term.boolean
hasCode()
Decide whether the term has code to generate.void
sort()
Sort constituent terms in column by type order.-
Methods inherited from class ptolemy.cg.lib.syntactic.SyntacticTermList
_refreshPorts, _refreshRank, add, add, addAll, clear, getInputs, getOrder, getOutputs, inputIndex, outputIndex, rank, remove, remove, removeAll, set, sizeInputs, sizeOutputs
-
Methods inherited from class java.util.LinkedList
addAll, addFirst, addLast, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, size, spliterator, toArray, toArray
-
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subList
-
-
-
-
Method Detail
-
doesFollow
public boolean doesFollow(SyntacticTerm node)
Decide if given node follows completely from this column. To be true there must be at least one connection from the column to the node and all incoming connections must follow from this column.- Parameters:
node
- The node possibly following the column.- Returns:
- Whether the given node follows completely from given column.
-
sort
public void sort()
Sort constituent terms in column by type order. Sorting a column will change its neighboring permutations.
-
generateCode
public java.lang.String generateCode()
Description copied from class:SyntacticTermList
Generate code for the term. In the case of this base class it is blank.- Specified by:
generateCode
in interfaceSyntacticTerm
- Overrides:
generateCode
in classSyntacticTermList
- Returns:
- string containing the code for the term.
-
hasCode
public boolean hasCode()
Description copied from class:SyntacticTermList
Decide whether the term has code to generate.- Specified by:
hasCode
in interfaceSyntacticTerm
- Overrides:
hasCode
in classSyntacticTermList
- Returns:
- whether the term has code to generate.
-
-