public final class ActionPattern extends NamedLapElement<ActionPattern,PoshPlan>
actions
.
Action patterns: or simple sequences. These are a basic kind of plan
aggregate which turn out to be useful in quite a lot of situations, despite
their lack of flexibility. They reduce the combinatorial complexity of the
agent when a full competence is not really necessary.Modifier and Type | Field and Description |
---|---|
static String |
apComment
Property name for comment
|
static String |
apName
Property name for name of this AP.
|
static String |
apParams
Property name for parameters of AP.
|
static DataFlavor |
dataFlavor
Data flavor of AP for drag and drop.
|
protected FormalParameters |
params
Formal parameters of this AP.
|
IDENT_PATTERN
Modifier and Type | Method and Description |
---|---|
void |
addAction(int index,
TriggeredAction action)
Add new @action as action of this AP, emit new child.
|
void |
addAction(TriggeredAction action)
Add new TriggeredAction as child of this AP.
|
List<TriggeredAction> |
getActions()
Get list of actions in this AP.
|
List<TriggeredAction> |
getChildDataNodes()
Get list of children of this node.
|
DataFlavor |
getDataFlavor()
Get data flavour of posh plan element,used during DnD from palette to
PoshScene.
|
String |
getName()
Get name of AP.
|
FormalParameters |
getParameters()
Get formal parametrs of this AP.
|
boolean |
moveChild(int newIndex,
PoshElement child)
Move child to the @newIndex.
|
void |
removeAction(TriggeredAction action)
Remove action from this AP and emit notification.
|
void |
rename(String newAPName)
Rename
ActionPattern in the PoshPlan . |
void |
setName(String name)
Set name of AP.
|
void |
setParameters(FormalParameters newParams)
Change parameters of the AP.
|
String |
toString() |
getUnusedName, isUsedName, moveChildInList
addElementListener, emitChildDeleted, emitChildMove, emitChildNode, firePropertyChange, getElementListeners, getNumberOfChildInstances, getParent, getRootNode, isChildOfParent, removeElementListener, setParent
protected FormalParameters params
public static final String apName
public static final String apComment
public static final String apParams
public static final DataFlavor dataFlavor
public void addAction(TriggeredAction action) throws CycleException
action
- action to be added into this APCycleException
public void addAction(int index, TriggeredAction action) throws CycleException
index
- Index at which to put the @action.action
- orphanCycleException
public List<TriggeredAction> getChildDataNodes()
PoshElement
getChildDataNodes
in class PoshElement<ActionPattern,PoshPlan>
public void setName(String name) throws InvalidNameException, DuplicateNameException, CycleException
name
- string tham matches IDENT_PATTERNInvalidNameException
DuplicateNameException
CycleException
public String getName()
getName
in class NamedLapElement<ActionPattern,PoshPlan>
public boolean moveChild(int newIndex, PoshElement child)
PoshElement
moveChild
in class PoshElement<ActionPattern,PoshPlan>
public DataFlavor getDataFlavor()
PoshElement
getDataFlavor
in class PoshElement<ActionPattern,PoshPlan>
public void removeAction(TriggeredAction action)
action
- Action that will be removed.public List<TriggeredAction> getActions()
public FormalParameters getParameters()
public void setParameters(FormalParameters newParams) throws MissingParameterException
newParams
- New parameters of AP.MissingParameterException
public void rename(String newAPName) throws InvalidNameException, DuplicateNameException, CycleException
ActionPattern
in the PoshPlan
.
This method finds all references ín the plan where this AP is references
and changes them to the @newAPNamenewAPName
- New name for this AP in the plan.InvalidNameException
DuplicateNameException
CycleException
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.