public class ActionPattern extends NamedLapElement implements Comparable<ActionPattern>
(AP avoid (minutes 10) (stop-bot rotate then-walk))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 |
static String |
apName |
static String |
apTimeoutAmmount |
static String |
apTimeoutUnits |
static DataFlavor |
dataFlavor |
protected FormalParameters |
parameters |
IDENT_PATTERN
Constructor and Description |
---|
ActionPattern(String name) |
Modifier and Type | Method and Description |
---|---|
void |
addChildDataNode(PoshElement newChild)
This will add new child to the tree.
|
boolean |
addTriggeredAction(TriggeredAction action)
Add new TriggeredAction as child of this AP, take care of adding widget and so on.
|
int |
compareTo(ActionPattern o) |
List<PoshElement> |
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 node.
|
String |
getNodeComment() |
Double |
getNodeTimeoutAmmount() |
Integer |
getNodeTimeoutUnits() |
FormalParameters |
getParameters()
Get formal parametrs of this AP.
|
List<TriggeredAction> |
getTriggeredActions() |
boolean |
moveChild(PoshElement child,
int relativePosition)
Move child node in list of children up or down.
|
void |
neutralizeChild(PoshElement childNode)
Neutralize childNode of the node.
|
void |
setName(String name)
Set name of AP.
|
void |
setNodeComment(String comment)
Set comment of AP.
|
void |
setNodeTimeoutAmmount(Double a)
Set how many timeout units should AP wait until it gives up.
|
void |
setNodeTimeoutUnits(Integer newUnitsId)
Set type of units of timeout.
|
protected void |
setParameters(FormalParameters parameters)
Set the formal parameters of this
|
String |
toString() |
getUnusedName, isUsedName, moveNodeInList
addElementListener, emitChildMove, emitChildNode, emitNodeDeleted, firePropertyChange, getElementListeners, getNumberOfChildInstances, getParent, getRelativePosition, getRootNode, neutralize, remove, removeElementListener, setParent
public static final String apName
public static final String apTimeoutAmmount
public static final String apTimeoutUnits
public static final String apComment
public static final DataFlavor dataFlavor
protected FormalParameters parameters
public ActionPattern(String name)
public boolean addTriggeredAction(TriggeredAction action)
action
- public List<PoshElement> getChildDataNodes()
PoshElement
getChildDataNodes
in class PoshElement
public void setNodeComment(String comment)
comment
- text without " in it.public String getNodeComment()
public Double getNodeTimeoutAmmount()
public void setNodeTimeoutAmmount(Double a)
a
- public Integer getNodeTimeoutUnits()
public void setNodeTimeoutUnits(Integer newUnitsId)
newUnitsId
- getId() from enum TimeUnits.public void setName(String name) throws ParseException
name
- string tham matches IDENT_PATTERNParseException
public String getName()
getName
in class NamedLapElement
public boolean moveChild(PoshElement child, int relativePosition)
PoshElement
moveChild
in class PoshElement
public DataFlavor getDataFlavor()
PoshElement
getDataFlavor
in class PoshElement
public void addChildDataNode(PoshElement newChild)
PoshElement
newChild
can be children (real type or some other things)
and add it to its children. If child is not accepted, don't add it
REMEBER: that in widget view I should see nodes in groups(not Comp, Freq,
Comp), so adjust getChildDataNodes accordingly (Comp, Comp, Freq)addChildDataNode
in class PoshElement
newChild
- Child that may be addedpublic void neutralizeChild(PoshElement childNode)
PoshElement
neutralizeChild
in class PoshElement
childNode
- node that will be neutralizedpublic List<TriggeredAction> getTriggeredActions()
public int compareTo(ActionPattern o)
compareTo
in interface Comparable<ActionPattern>
protected void setParameters(FormalParameters parameters)
parameters
- public FormalParameters getParameters()
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.