Constructor and Description |
---|
GuardedAction(Guard guard,
Action action)
Constructs object with the specified guard condition and action.
|
Modifier and Type | Method and Description |
---|---|
void |
addClock(Event clock)
Adds the specified clock event to this object's collection.
|
void |
addClocks(java.util.Collection<Event> clocks)
Adds the specified clock events collection to the object's collection.
|
boolean |
equals(java.lang.Object obj) |
Action |
getAction()
Returns action.
|
java.util.Collection<Event> |
getClocks()
Returns clock events.
|
java.util.Set<ru.ispras.fortress.expression.NodeVariable> |
getDefines()
Returns a set of defined variables.
|
EventList |
getEventList()
Returns list of object's clock events.
|
Guard |
getGuard()
Returns guard.
|
java.util.Set<ru.ispras.fortress.expression.NodeVariable> |
getUses()
Returns a set of used variables.
|
java.lang.Iterable<ru.ispras.fortress.expression.NodeVariable> |
getUsesByAction()
Returns variables that are used in
Action action. |
java.lang.Iterable<ru.ispras.fortress.expression.NodeVariable> |
getUsesByGuard()
Returns variables that are used in
Guard condition. |
int |
hashCode() |
boolean |
isSensible(Event event)
Checks that the specified event is in the object's clock collection.
|
boolean |
isSensible(EventList eventList)
Checks if this guarded action is sensible to the specified events.
|
java.lang.String |
toString() |
addMetaInfo, addMetaInfo, addMetaInfo, addMetaInfo, getMetaInfo, getMetaInfo, getMetaInfo, hasMetaInfo, hasMetaInfo, removeMetaInfo
public Action getAction()
public Guard getGuard()
public EventList getEventList()
public java.util.Collection<Event> getClocks()
public void addClock(Event clock)
clock
- clock eventjava.lang.IllegalArgumentException
- when argument is null
.public void addClocks(java.util.Collection<Event> clocks)
clocks
- clocks collectionjava.lang.IllegalArgumentException
- when argument is null
.public java.lang.Iterable<ru.ispras.fortress.expression.NodeVariable> getUsesByGuard()
Guard
condition.public java.lang.Iterable<ru.ispras.fortress.expression.NodeVariable> getUsesByAction()
Action
action.public boolean isSensible(Event event)
event
- eventtrue
if the specified event is in the object's clock collection
or the list is empty, false
otherwise.public boolean isSensible(EventList eventList)
eventList
- an event list to be testedtrue
if at least one of the specified events
is in the object's clock collection or it is empty, false
otherwise.public java.util.Set<ru.ispras.fortress.expression.NodeVariable> getUses()
UseDef
public java.util.Set<ru.ispras.fortress.expression.NodeVariable> getDefines()
UseDef
getDefines
in interface UseDef
public java.lang.String toString()
toString
in class java.lang.Object