public class EventList
extends java.lang.Object
Constructor and Description |
---|
EventList()
The default constructor.
|
EventList(java.util.Set<Event> events)
Constructs object with the specified events collection.
|
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 |
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
Event events. |
boolean |
contains(Event event)
Checks rather event is in this class.
|
boolean |
contains(ru.ispras.fortress.expression.NodeVariable variable)
Checks rather object contains an event with the specified variable.
|
EventList |
deepcopy()
Returns a deep copy of this object.
|
boolean |
equals(java.lang.Object o) |
int |
eventNum()
Returns number of events.
|
java.util.Collection<Event> |
getEvents()
Returns a collection of events.
|
int |
hashCode() |
boolean |
isCompatible(EventList eventList)
Checks if this event list is compatible with the specified one, that is, they aren't mutually
exclusive.
|
boolean |
isEmpty()
Checks if this event list is empty.
|
boolean |
isTriggeredBy(Event event)
Checks if this event list is always triggered along with the specified one (for example, if
this event is any edge of some variable while other is positive edge of the same variable).
|
void |
remove(RangedVariable variable)
Removes an event with the specified variable.
|
java.lang.String |
toString() |
public EventList()
public EventList(java.util.Set<Event> events)
events
- events collectionjava.lang.NullPointerException
- when argument is null
.public boolean contains(Event event)
event
- event objecttrue
if event is here, false
otherwisejava.lang.NullPointerException
- when argument is null
.public boolean contains(ru.ispras.fortress.expression.NodeVariable variable)
variable
- variable of an event of the object to be checkedtrue
if object contains an event with the specified variable,
false
otherwisejava.lang.NullPointerException
- when argument is null
.public void add(Event event)
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 objectjava.lang.NullPointerException
- when argument is null
.public void remove(RangedVariable variable)
variable
- event's variablejava.lang.NullPointerException
- when argument is null
.public void addEvents(java.util.Collection<? extends Event> events)
events
- event collectionjava.lang.NullPointerException
- when argument is null
.public boolean isEmpty()
true
if this event list doesn't contain any events, false
otherwise.public int eventNum()
public java.util.Collection<Event> getEvents()
public void applyToEventList(java.util.Map<java.lang.String,ru.ispras.fortress.expression.Node> bindings)
bindings
- "event's variable name - bounded expression" mapjava.lang.NullPointerException
- when argument is null
.public boolean isCompatible(EventList eventList)
eventList
- the event list to be tested for compatibility with this onetrue
if the lists are compatible, otherwise returns false
Event.isCompatible(Event)
public boolean isTriggeredBy(Event event)
event
- the event to be testedtrue
if this event is always triggered along with the specified one, otherwise
returns false
public EventList deepcopy()
public void clear()
Event
events.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object