|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.sposh.elements.LapElementsFactory
public class LapElementsFactory
This is a factory class that can be used to create various elements.
| Field Summary | |
|---|---|
static String |
DEFAULT_ACTION
Name of action that will be used unless user specifies a name of action that should be used. |
static String |
DEFAULT_DRIVE_COLLECTION_NAME
|
static String |
DEFAULT_TRIGGER_SENSE
Name of trigger that will be used unless user specifies some other trigger in the arguments. |
| Constructor Summary | |
|---|---|
LapElementsFactory()
|
|
| Method Summary | |
|---|---|
static TriggeredAction |
createAction()
Create default action. |
static TriggeredAction |
createAction(PrimitiveCall call)
Create action for specified call. |
static TriggeredAction |
createAction(String name)
Create action with specified name. |
static TriggeredAction |
createAction(TriggeredAction original)
Copy method for an action. |
static ActionPattern |
createActionPattern(ActionPattern ap)
Create an AP with same structure as passed ap (only structure, no listeners or shared objects). |
static ActionPattern |
createActionPattern(String name)
Create new action pattern without parameters and no actions. |
static ActionPattern |
createActionPattern(String name,
FormalParameters params)
Create empty action pattern with specified name and parameters, but without any actions in it. |
static ActionPattern |
createActionPattern(String name,
FormalParameters params,
List<TriggeredAction> actions)
Create action pattern |
static ActionPattern |
createActionPattern(String name,
TriggeredAction... actions)
Create new action pattern without parameters and containing passed actions. |
static Competence |
createCompetence(Competence c)
Create a C with same structure as passed c (only structure, no listeners or shared objects). |
static Competence |
createCompetence(String name,
String... choices)
Create a new competence with multiple choices. |
static CompetenceElement |
createCompetenceElement(String name)
Create new competence element with no trigger sense and default action. |
static CompetenceElement |
createCompetenceElement(String name,
List<Sense> triggerSenses,
String actionName)
|
static DriveCollection |
createDriveCollection()
Create empty drive collection without trigger senses and drives, with blank name. |
static DriveCollection |
createDriveCollection(String driveCollectionName)
Create empty (i.e. |
static DriveElement |
createDriveElement(DriveElement drive)
|
static DriveElement |
createDriveElement(String driveName)
Create new drive with default trigger and action. |
static DriveElement |
createDriveElement(String name,
List<Sense> triggerSenses,
PrimitiveCall actionCall,
Freq freq,
String comment)
Create new drive element |
static DriveElement |
createDriveElementNoTriggers(String name)
Create new drive with specified name and empty list of triggers and default action. |
static PoshPlan |
createPlan(String dcName)
Create new plan with DC |
static Sense |
createSense(Sense sense)
Create a copy of sense (only structure, no listeners or shared objects) |
static Sense |
createSense(String name)
Create new sense. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static String DEFAULT_ACTION
public static String DEFAULT_TRIGGER_SENSE
public static String DEFAULT_DRIVE_COLLECTION_NAME
| Constructor Detail |
|---|
public LapElementsFactory()
| Method Detail |
|---|
public static Competence createCompetence(String name,
String... choices)
throws DuplicateNameException
name - name of new competencechoices - unique sequence of choices for this competence
DuplicateNameExceptionpublic static DriveElement createDriveElement(String driveName)
driveName - name of the drivepublic static DriveElement createDriveElementNoTriggers(String name)
name - name of created drive elementpublic static CompetenceElement createCompetenceElement(String name)
name - name of competence element
public static Sense createSense(String name)
name - name of the sense
public static TriggeredAction createAction()
public static TriggeredAction createAction(String name)
name - Name of the action
public static TriggeredAction createAction(PrimitiveCall call)
public static ActionPattern createActionPattern(String name)
name - Name of new action pattern
public static ActionPattern createActionPattern(String name,
TriggeredAction... actions)
name - Name of new action patternactions - Sequence of actions that will in the AP
public static ActionPattern createActionPattern(String name,
FormalParameters params)
name - Name of the AP
public static ActionPattern createActionPattern(String name,
FormalParameters params,
List<TriggeredAction> actions)
name - Name of the APparams - parameters of this APactions - actions that will be in the AP
public static ActionPattern createActionPattern(ActionPattern ap)
ap - action pattern to copy
public static Competence createCompetence(Competence c)
c - competence to copy
public static DriveElement createDriveElement(DriveElement drive)
public static Sense createSense(Sense sense)
sense -
public static DriveCollection createDriveCollection()
public static DriveCollection createDriveCollection(String driveCollectionName)
DriveCollection with specified
name.
driveCollectionName - Name of the created DriveCollection
DriveCollection.
public static CompetenceElement createCompetenceElement(String name,
List<Sense> triggerSenses,
String actionName)
public static DriveElement createDriveElement(String name,
List<Sense> triggerSenses,
PrimitiveCall actionCall,
Freq freq,
String comment)
name - Name of the drive elementtriggerSenses - list of senses that will be used as a triggeractionCall - What to call if drive is electedfreq - How frequently can be this drive called (if called more
frequently, the calls will not be elegible)comment - Comment about the element
public static PoshPlan createPlan(String dcName)
dcName - name of the DC
public static TriggeredAction createAction(TriggeredAction original)
original -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||