public class StateMatcher extends State implements GTEntity, TypedActor, ValueListener
Red (tfeng) |
Yellow (tfeng) |
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
GTIngredientsAttribute |
criteria
The attribute containing all the criteria in a list
(
GTIngredientList ). |
GTIngredientsEditor.Factory |
editorFactory
The editor factory for ingredients in this matcher.
|
GTIngredientsAttribute |
operations
The attribute containing all the operations in a list
(
GTIngredientList ). |
PatternObjectAttribute |
patternObject
The attribute that specifies the name of the corresponding entity in the
pattern.
|
incomingPort, isFinalState, isInitialState, outgoingPort, refinementName, saveRefinementsInConfigurer
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
StateMatcher(CompositeEntity container,
java.lang.String name)
Construct a state with the given name contained by the specified
composite entity.
|
Modifier and Type | Method and Description |
---|---|
void |
addInitializable(Initializable initializable)
Do nothing because a state matcher is not supposed to contain any
initializable.
|
java.lang.Object |
clone(Workspace workspace)
Clone the actor into the specified workspace.
|
void |
createReceivers()
Create receivers for all necessary ports.
|
void |
fire()
Do nothing.
|
CausalityInterface |
getCausalityInterface()
Return a causality interface for this actor.
|
GTIngredientsAttribute |
getCriteriaAttribute()
Return the attribute that stores all the criteria for this matcher.
|
java.lang.String |
getDefaultIconDescription()
Return null.
|
Director |
getDirector()
Return null.
|
Director |
getExecutiveDirector()
Return null.
|
Manager |
getManager()
Return null.
|
GTIngredientsAttribute |
getOperationsAttribute()
Return the attribute that stores all the operations for this matcher.
|
PatternObjectAttribute |
getPatternObjectAttribute()
Return the attribute that stores the name of the corresponding entity in
the pattern of the same
TransformationRule , if this entity is in
the replacement, or null otherwise. |
void |
initialize()
Do nothing.
|
java.util.List<?> |
inputPortList()
Return an empty list.
|
boolean |
isBackwardTypeInferenceEnabled()
Return false because backward type inference is not implemented
for this actor.
|
boolean |
isFireFunctional()
Return true because prefire and fire do nothing.
|
boolean |
isStrict()
Return false.
|
int |
iterate(int count)
Do nothing and return 0.
|
java.util.Set<java.lang.String> |
labelSet()
Return the set of names of ingredients contained in this entity that can
be resolved.
|
boolean |
match(NamedObj object)
Return true if the given object is an instance of State (either the one
in the deprecated FSM domain or the one in modal model since Ptolemy
8.0).
|
Receiver |
newReceiver()
Return null.
|
java.util.List<?> |
outputPortList()
Return an empty list.
|
boolean |
postfire()
Do nothing and return false.
|
boolean |
prefire()
Do nothing and return false.
|
void |
preinitialize()
Do nothing.
|
void |
removeInitializable(Initializable initializable)
Do nothing.
|
void |
setContainer(CompositeEntity container)
Specify the container, adding the entity to the list
of entities in the container.
|
void |
stop()
Do nothing.
|
void |
stopFire()
Do nothing.
|
void |
terminate()
Do nothing.
|
java.util.Set<Inequality> |
typeConstraints()
Return an empty list.
|
void |
updateAppearance(GTIngredientsAttribute attribute)
Update appearance of this entity.
|
void |
valueChanged(Settable settable)
React to the fact that the specified Settable has changed.
|
void |
wrapup()
Do nothing.
|
_exportMoMLContents, attributeChanged, configure, dropObject, errorTransitionList, getConfigurer, getConfigureSource, getConfigureText, getIncomingPort, getObjectInRefinement, getOutgoingPort, getRefinement, nonErrorNonTerminationTransitionList, nonpreemptiveTransitionList, preemptiveTransitionList, terminationTransitionList
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, newPort, propagateExistence, setName
_addPort, _description, _removePort, _validateSettables, connectedPortList, connectedPorts, connectionsChanged, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
description, getContainer, getDisplayName, getFullName, getName, getName, setName
getDerivedLevel, getDerivedList, propagateValue
public GTIngredientsAttribute criteria
GTIngredientList
).public GTIngredientsEditor.Factory editorFactory
public GTIngredientsAttribute operations
GTIngredientList
).public PatternObjectAttribute patternObject
public StateMatcher(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of the state.IllegalActionException
- If the state cannot be contained
by the proposed container.NameDuplicationException
- If the name coincides with
that of an entity already in the container.public void addInitializable(Initializable initializable)
addInitializable
in interface Initializable
initializable
- The initializable.Initializable.removeInitializable(Initializable)
public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class State
workspace
- The workspace for the new object.java.lang.CloneNotSupportedException
- If a derived class has
has an attribute that cannot be cloned.NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public void createReceivers() throws IllegalActionException
createReceivers
in interface Actor
IllegalActionException
- If any port throws it.AtomicActor.createReceivers()
,
CompositeActor.createReceivers()
public void fire() throws IllegalActionException
fire
in interface Executable
IllegalActionException
- Not thrown in this class.public CausalityInterface getCausalityInterface()
getCausalityInterface
in interface Actor
public GTIngredientsAttribute getCriteriaAttribute()
getCriteriaAttribute
in interface GTEntity
public java.lang.String getDefaultIconDescription()
getDefaultIconDescription
in interface GTEntity
public Director getDirector()
getDirector
in interface Actor
public Director getExecutiveDirector()
getExecutiveDirector
in interface Actor
public Manager getManager()
getManager
in interface Actor
public GTIngredientsAttribute getOperationsAttribute()
getOperationsAttribute
in interface GTEntity
public PatternObjectAttribute getPatternObjectAttribute()
TransformationRule
, if this entity is in
the replacement, or null otherwise.getPatternObjectAttribute
in interface GTEntity
labelSet()
public void initialize() throws IllegalActionException
initialize
in interface Initializable
IllegalActionException
- Not thrown in this class.public java.util.List<?> inputPortList()
inputPortList
in interface Actor
public boolean isBackwardTypeInferenceEnabled()
isBackwardTypeInferenceEnabled
in interface TypedActor
public boolean isFireFunctional()
isFireFunctional
in interface Executable
public boolean isStrict()
isStrict
in interface Executable
public int iterate(int count) throws IllegalActionException
iterate
in interface Executable
count
- The number of iteration.IllegalActionException
- Not thrown in this class.public java.util.Set<java.lang.String> labelSet()
public boolean match(NamedObj object)
public Receiver newReceiver() throws IllegalActionException
newReceiver
in interface Actor
IllegalActionException
- Not thrown in this class.public java.util.List<?> outputPortList()
outputPortList
in interface Actor
public boolean postfire() throws IllegalActionException
postfire
in interface Executable
IllegalActionException
- Not thrown in this class.public boolean prefire() throws IllegalActionException
prefire
in interface Executable
IllegalActionException
- Not thrown in this class.public void preinitialize() throws IllegalActionException
preinitialize
in interface Initializable
IllegalActionException
- Not thrown in this class.public void removeInitializable(Initializable initializable)
removeInitializable
in interface Initializable
initializable
- The initializable.Initializable.addInitializable(Initializable)
public void setContainer(CompositeEntity container) throws IllegalActionException, NameDuplicationException
setContainer
in class ComponentEntity
container
- The proposed container.IllegalActionException
- If the action would result in a
recursive containment structure, or if
this entity and container are not in the same workspace, or
if the protected method _checkContainer() throws it, or if
a contained Settable becomes invalid and the error handler
throws it.NameDuplicationException
- If the name of this entity
collides with a name already in the container.ComponentEntity.getContainer()
public void stop()
stop
in interface Executable
public void stopFire()
stopFire
in interface Executable
public void terminate()
terminate
in interface Executable
public java.util.Set<Inequality> typeConstraints() throws IllegalActionException
typeConstraints
in interface TypedActor
IllegalActionException
- Not thrown in this class.Inequality
public void updateAppearance(GTIngredientsAttribute attribute)
updateAppearance
in interface GTEntity
attribute
- The attribute containing ingredients of this entity.GTEntityUtils.updateAppearance(GTEntity, GTIngredientsAttribute)
public void valueChanged(Settable settable)
valueChanged
in interface ValueListener
settable
- The object that has changed value.GTEntityUtils.valueChanged(GTEntity, Settable)
public void wrapup() throws IllegalActionException
wrapup
in interface Initializable
IllegalActionException
- Not thrown in this class.