public class LapElementsFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
LapElementsFactory() |
| Modifier and Type | Method and Description |
|---|---|
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 one
default
action. |
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(CompetenceElement choice)
Create a copy of a passed choice.
|
static CompetenceElement |
createCompetenceElement(DriveElement drive)
Create choice from the passed drive.
|
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. no drives)
DriveCollection with specified
name. |
static DriveElement |
createDriveElement(CompetenceElement choice)
Create drive based on the choice.
|
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.
|
public static String DEFAULT_ACTION
public static String DEFAULT_TRIGGER_SENSE
public static String DEFAULT_DRIVE_COLLECTION_NAME
public static Competence createCompetence(String name, String... choices) throws DuplicateNameException
name - name of new competencechoices - unique sequence of choices for this competenceDuplicateNameExceptionpublic 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 elementpublic static Sense createSense(String name)
name - name of the sensepublic static TriggeredAction createAction()
public static TriggeredAction createAction(String name)
name - Name of the actionpublic static TriggeredAction createAction(PrimitiveCall call)
public static ActionPattern createActionPattern(String name)
default
action.name - Name of new action patternpublic static ActionPattern createActionPattern(String name, TriggeredAction... actions)
name - Name of new action patternactions - Sequence of actions that will in the APpublic static ActionPattern createActionPattern(String name, FormalParameters params)
name - Name of the APpublic 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 APpublic static ActionPattern createActionPattern(ActionPattern ap)
ap - action pattern to copypublic static Competence createCompetence(Competence c)
c - competence to copypublic 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 DriveCollectionDriveCollection.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 elementpublic static CompetenceElement createCompetenceElement(DriveElement drive)
drive - Base for created choicepublic static CompetenceElement createCompetenceElement(CompetenceElement choice)
choice - Choice that will be used as originalpublic static DriveElement createDriveElement(CompetenceElement choice)
choice - Choice used as base for new drive.public static PoshPlan createPlan(String dcName)
dcName - name of the DCpublic static TriggeredAction createAction(TriggeredAction original)
original - Copyright © 2018 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All rights reserved.