public class FolAction extends java.lang.Object implements java.lang.Iterable<FOLAtom>, ActionName
Modifier and Type | Field and Description |
---|---|
private java.util.Set<FOLAtom> |
actionNames |
Constructor and Description |
---|
FolAction()
Creates a new action, which maps all action names to false.
|
FolAction(java.util.Set<FOLAtom> actionNames)
Creates a new action, which maps the given action names to true, and every
thing else to false.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<FOLAtom> |
getAtoms()
Returns all atoms, e.g.
|
java.lang.String |
getName()
Returns the name of this action.
|
boolean |
isGround()
Checks whether this action is ground or not.
|
java.util.Iterator<FOLAtom> |
iterator() |
FolAction |
substitute(java.util.Map<? extends Term<?>,? extends Term<?>> map)
Substitutes terms in all non-zero-arity atoms in this action according to
the given map.
|
java.lang.String |
toString() |
private java.util.Set<FOLAtom> actionNames
public FolAction()
public FolAction(java.util.Set<FOLAtom> actionNames)
actionNames
- a set of action names which are mapped to true by this
action.public java.util.Set<FOLAtom> getAtoms()
public java.lang.String toString()
toString
in class java.lang.Object
public FolAction substitute(java.util.Map<? extends Term<?>,? extends Term<?>> map)
map
- a map, containing all substitutions to be applied.public boolean isGround()
public java.util.Iterator<FOLAtom> iterator()
iterator
in interface java.lang.Iterable<FOLAtom>
public java.lang.String getName()
ActionName
getName
in interface ActionName