public class Event extends MetaInfo
Data that characterizes changing of some variable (signal) level.
Constructor and Description |
---|
Event(ru.ispras.fortress.expression.NodeVariable variable,
EventType type)
Constructs the event object with the specified variable and type.
|
Event(ru.ispras.castle.ast.RangedVariable variable)
Constructs an object with the specified variable and of any edge event type.
|
Event(ru.ispras.castle.ast.RangedVariable variable,
EventType type)
Constructs an object with the specified variable and event type.
|
Modifier and Type | Method and Description |
---|---|
Event |
deepCopy()
Returns a deep copy of this object.
|
boolean |
equals(java.lang.Object object) |
ru.ispras.castle.ast.RangedVariable |
getRangedVariable()
Returns the event ranged variable.
|
EventType |
getType()
Returns type.
|
ru.ispras.fortress.expression.NodeVariable |
getVariable()
Returns the event variable.
|
int |
hashCode() |
boolean |
incompatibleWith(Event event)
Checks whether this object is compatible with the specified one.
|
boolean |
isTriggered(Event event)
Checks whether this object is triggered by the specified one.
|
java.lang.String |
toString() |
addMetaInfo, addMetaInfo, addMetaInfo, addMetaInfo, getAllMetaInfo, getMetaInfo, getMetaInfo, getStringMetaInfo, getStringMetaInfo, hasMetaInfo, hasMetaInfo
public Event(ru.ispras.castle.ast.RangedVariable variable, EventType type)
variable
- Ranged variable.type
- Event type.java.lang.IllegalArgumentException
- when any of the arguments is null
.public Event(ru.ispras.fortress.expression.NodeVariable variable, EventType type)
variable
- The event variable.type
- The event type.java.lang.IllegalArgumentException
- when any of the arguments is null
.public Event(ru.ispras.castle.ast.RangedVariable variable)
variable
- Ranged variable.java.lang.IllegalArgumentException
- when argument is null
.public EventType getType()
public ru.ispras.castle.ast.RangedVariable getRangedVariable()
public ru.ispras.fortress.expression.NodeVariable getVariable()
public boolean isTriggered(Event event)
Checks if this event 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).
event
- Event to be tested.true
if this event is always triggered along with the specified one, otherwise
returns false
.public boolean incompatibleWith(Event event)
Checks if this event is compatible with the specified one, that is, they aren't mutually exclusive.
event
- Event to be tested for compatibility with this one.true
if the events are incompatible, otherwise returns false
.public Event deepCopy()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object