Constructor and Description |
---|
EventList()
Default constructor.
|
EventList(java.util.Collection<Event> events)
Constructs object with the specified events collection.
|
EventList(Event event)
Constructs object from the specified event object.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Event event)
Adds event.
|
void |
addEvents(java.util.Collection<? extends Event> events)
Adds a collection of events.
|
void |
addEvents(EventList events)
Adds events from the specified collection to this one.
|
void |
applyToEventList(java.util.Map<java.lang.String,ru.ispras.fortress.expression.Node> bindings)
Applies expressions to bounded event variables.
|
void |
clear()
Removes all the internal events.
|
boolean |
compatibleWith(EventList eventList)
Checks if this object is compatible with the specified one.
|
boolean |
contains(Event event)
Checks whether this object contains the specified event.
|
boolean |
contains(ru.ispras.fortress.expression.NodeVariable variable)
Checks whether this object contains an event on the specified variable.
|
EventList |
deepCopy()
Returns a deep copy of this object.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
boolean |
isEmpty()
Checks if this object is empty.
|
boolean |
isTriggered(Event event)
Checks if this object is always triggered along with the specified argument.
|
java.util.Iterator<Event> |
iterator() |
void |
remove(Event event)
Removes the specified event from object's sensitivity list.
|
void |
remove(ru.ispras.fortress.expression.NodeVariable variable)
Removes an event on the specified variable.
|
void |
remove(ru.ispras.castle.ast.RangedVariable variable)
Removes an event on the specified ranged variable.
|
java.lang.String |
toString() |
public EventList()
public EventList(Event event)
event
- Object from which event list is constructed.java.lang.IllegalArgumentException
- when argument is null
.public EventList(java.util.Collection<Event> events)
events
- Events.java.lang.IllegalArgumentException
- when argument is null
.public boolean contains(Event event)
event
- Event object.true
if event is here, false
otherwise.java.lang.IllegalArgumentException
- when argument is null
.public boolean contains(ru.ispras.fortress.expression.NodeVariable variable)
variable
- Variable of an event of the object to be checked.true
if object contains an event with the specified variable,
false
otherwise.java.lang.IllegalArgumentException
- when argument is null
.public void add(Event event)
If this object already contains an event with the same
RangedVariable
as the specified Event
has,
but their EventType
types are different,
the Event
object with the same RangedVariable
and EventType.ANY_EDGE
event type.
event
- Event object.java.lang.IllegalArgumentException
- when argument is null
.public void remove(ru.ispras.castle.ast.RangedVariable variable)
variable
- The event's ranged variable.java.lang.IllegalArgumentException
- when argument is null
.public void remove(ru.ispras.fortress.expression.NodeVariable variable)
variable
- The event's variable.java.lang.IllegalArgumentException
- when argument is null
.public void remove(Event event)
event
- The event to be removed.java.lang.IllegalArgumentException
- when argument is null
.public void addEvents(java.util.Collection<? extends Event> events)
events
- Event collection.java.lang.IllegalArgumentException
- when argument is null
.public void addEvents(EventList events)
events
- The container of events to be added to this object.java.lang.IllegalArgumentException
- when argument is null
.public boolean isEmpty()
true
if this event list doesn't contain any events, false
otherwise.public void applyToEventList(java.util.Map<java.lang.String,ru.ispras.fortress.expression.Node> bindings)
bindings
- Mapping of event variables names to expressions that are to be applied.java.lang.IllegalArgumentException
- when argument is null
.public boolean compatibleWith(EventList eventList)
Checks if this object and the specified object are not mutually exclusive.
eventList
- Event list to be tested for compatibility with this one.true
if the lists are compatible, otherwise returns false
Event.incompatibleWith(Event)
public boolean isTriggered(Event event)
Checks if this object is triggered by the specified Event
object, for example,
if this event is any edge of some variable while other is positive edge of the same variable.
To trigger this object it is necessary and sufficient to trigger at least one of its
events.
event
- Event to be tested.true
if this event is always triggered along with the specified one,
false
otherwise.public EventList deepCopy()
public void clear()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object