public class Event extends MetaInfo
Data that characterizes changing of some variable (signal) level.
Constructor and Description |
---|
Event(RangedVariable variable)
Constructs an object with the specified variable and of any edge event type.
|
Event(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 obj) |
RangedVariable |
getRangedVariable()
Returns variable.
|
EventType |
getType()
Returns type.
|
int |
hashCode() |
boolean |
isCompatible(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, getMetaInfo, getMetaInfo, getMetaInfo, hasMetaInfo, hasMetaInfo, removeMetaInfo
public Event(RangedVariable variable, EventType type)
variable
- Ranged variable.type
- Event type.java.lang.IllegalArgumentException
- when any of the arguments is null
.public Event(RangedVariable variable)
variable
- Ranged variable.java.lang.IllegalArgumentException
- when argument is null
.public EventType getType()
public RangedVariable getRangedVariable()
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 isCompatible(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 compatible, otherwise returns false
.public Event deepCopy()
public java.lang.String toString()
toString
in class java.lang.Object