public class SADomain extends java.lang.Object implements Domain
ActionType
s associated with
a problem and also stores an optional SampleModel
, if one exists, for planning problems or simulated domains.Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,ActionType> |
actionMap |
protected java.util.List<ActionType> |
actionTypes |
protected SampleModel |
model |
Constructor and Description |
---|
SADomain() |
Modifier and Type | Method and Description |
---|---|
SADomain |
addActionType(ActionType act)
Adds an
ActionType to this domain. |
SADomain |
addActionTypes(ActionType... actions)
Adds a set of
ActionType objects to this domain |
SADomain |
clearActionTypes()
Clears all
ActionType s specified for this domain. |
ActionType |
getAction(java.lang.String name)
Returns the
ActionType in this domain with the given type name, or null if one does not exist. |
java.util.List<ActionType> |
getActionTypes()
Returns the
ActionType s associated with this domain. |
SampleModel |
getModel()
Returns the
SampleModel associated with this domain, or null if one is not defined. |
SADomain |
setActionTypes(ActionType... actions)
Sets the
ActionType s for this domain. |
SADomain |
setActionTypes(java.util.List<ActionType> actions)
Sets the
ActionType s for this domain. |
void |
setModel(SampleModel model)
Sets the
SampleModel associated with this domain. |
protected java.util.List<ActionType> actionTypes
protected java.util.Map<java.lang.String,ActionType> actionMap
protected SampleModel model
public SADomain addActionType(ActionType act)
ActionType
to this domain.act
- the ActionType
to addpublic SADomain addActionTypes(ActionType... actions)
ActionType
objects to this domainactions
- the ActionType
objects to addpublic SADomain setActionTypes(ActionType... actions)
ActionType
s for this domain. Any previously added ActionType
s to this domain
will first be removed.actions
- the ActionType
s to use.public SADomain setActionTypes(java.util.List<ActionType> actions)
ActionType
s for this domain. Any previously added ActionType
s to this domain
will first be removed.actions
- the ActionType
s to use.public SADomain clearActionTypes()
ActionType
s specified for this domain.public java.util.List<ActionType> getActionTypes()
ActionType
s associated with this domain.ActionType
s associated with this domain.public ActionType getAction(java.lang.String name)
ActionType
in this domain with the given type name, or null if one does not exist.name
- the type nameActionType
public SampleModel getModel()
SampleModel
associated with this domain, or null if one is not defined.SampleModel
associated with this domain, or null if one is not defined.public void setModel(SampleModel model)
SampleModel
associated with this domain.model
- the SampleModel
to associate with this domain.