|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.amis.pogamut.sposh.elements.PoshElement<THIS,PARENT>
cz.cuni.amis.pogamut.sposh.elements.PoshDummyElement<CompetenceElement,Competence>
cz.cuni.amis.pogamut.sposh.elements.CompetenceElement
public final class CompetenceElement
CompetenceElement is basically one of choices of the Competence
. It
has a name(not used elsewhere in the tree, but unique), Trigger
and
defined TriggeredAction
that should be evaluated if the triggers is
satisfied.
(move (trigger ((see-player))) move-player)
Field Summary | |
---|---|
static String |
ceComment
Property name of comment . |
static String |
ceName
Property name of name . |
static String |
ceRetries
Property name of retries . |
static DataFlavor |
dataFlavor
Data flavor of competence element, used for drag and drop. |
static int |
INFINITE_RETRIES
Special value for infinite number of retries. |
Fields inherited from class cz.cuni.amis.pogamut.sposh.elements.PoshDummyElement |
---|
IDENT_PATTERN |
Constructor Summary | |
---|---|
CompetenceElement(String name,
List<Sense> triggerSenses,
PrimitiveCall actionCall,
int retries,
String comment)
Create a choice. |
Method Summary | |
---|---|
TriggeredAction |
getAction()
Get action of this choice. |
String |
getComment()
Deprecated. Not supported in the editor. |
Trigger<CompetenceElement> |
getCondition()
Get trigger of the choice. |
DataFlavor |
getDataFlavor()
Get data flavour of posh plan element,used during DnD from palette to PoshScene. |
List<PoshElement> |
getChildDataNodes()
Get list of children of this node. |
String |
getName()
Get name of the element. |
int |
getRetries()
Deprecated. Remnants of original posh, |
Trigger<CompetenceElement> |
getTrigger()
Get trigger of this choice. |
LapType |
getType()
Get type of the element. |
boolean |
moveChild(int newIndex,
PoshElement child)
Move child to the @newIndex. |
void |
rename(String newName)
Becasue name of a choice is not used as reference in the plan, this method only changes a name of a choice, identical to setName(java.lang.String) . |
void |
setComment(String newComment)
Deprecated. Not used in the editor |
void |
setName(String name)
Set name of this choice. |
void |
setRetries(int newRetries)
Deprecated. Not used in the editor |
String |
toString()
|
Methods inherited from class cz.cuni.amis.pogamut.sposh.elements.PoshDummyElement |
---|
getElementId, getUnusedName, isUsedName, moveChildInList |
Methods inherited from class cz.cuni.amis.pogamut.sposh.elements.PoshElement |
---|
addElementListener, emitChildDeleted, emitChildMove, emitChildNode, firePropertyChange, getElementListeners, getChildId, getChildren, getId, getParent, getRootNode, isChildOfParent, removeElementListener, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String ceName
name
.
public static final String ceRetries
retries
.
public static final String ceComment
comment
.
public static final DataFlavor dataFlavor
public static final int INFINITE_RETRIES
getRetries()
,
Constant Field ValuesConstructor Detail |
---|
public CompetenceElement(String name, List<Sense> triggerSenses, PrimitiveCall actionCall, int retries, String comment)
name
- Name of a choicetriggerSenses
- List of senses that will trigger the action of this
choiceactionCall
- Action call(=action name with arguments), name can be a
normal action, an AP/C name.Method Detail |
---|
public Trigger<CompetenceElement> getTrigger()
public Trigger<CompetenceElement> getCondition()
getCondition
in interface IConditionElement<CompetenceElement>
public TriggeredAction getAction()
public String toString()
toString
in class Object
public List<PoshElement> getChildDataNodes()
PoshElement
getChildDataNodes
in class PoshElement<CompetenceElement,Competence>
public String getName()
INamedElement
getName
in interface INamedElement
public void setName(String name) throws InvalidNameException, DuplicateNameException
name
- new name of this choice.
InvalidNameException
DuplicateNameException
public void rename(String newName) throws InvalidNameException, CycleException, DuplicateNameException
setName(java.lang.String)
.
rename
in interface INamedElement
newName
- New name of choice.
InvalidNameException
- Passed name is not valid Yaposh name.
CycleException
- Renaming causes cycle.
DuplicateNameException
- Such name is already used in the plan.setName(java.lang.String)
public boolean moveChild(int newIndex, PoshElement child)
PoshElement
moveChild
in class PoshElement<CompetenceElement,Competence>
public DataFlavor getDataFlavor()
PoshElement
getDataFlavor
in class PoshElement<CompetenceElement,Competence>
public LapType getType()
PoshElement
getType
in class PoshElement<CompetenceElement,Competence>
@Deprecated public int getRetries()
@Deprecated public void setRetries(int newRetries)
newRetries
- new number of retries. Must be ≥0 or INFINITE_RETRIES
.@Deprecated public String getComment()
@Deprecated public void setComment(String newComment)
newComment
- New comment of this element
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |