|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.amattioli.workstate.core.Event
public class Event
Represents an event that can be received by a state machine. An event is
identified by its MetaEvent and by its actual parameters. The actual
parameters values must be compatible with the formal parameters defined in
the MetaEvent.
| Field Summary | |
|---|---|
static Event |
NULL
This constant is a null event. |
| Constructor Summary | |
|---|---|
Event(MetaEvent metaEvent,
Map<String,Object> parameters)
Construct a new event given its MetaEvent and its actual
parameters. |
|
| Method Summary | |
|---|---|
Map<String,Object> |
getAllAttributes()
|
Object |
getAttribute(String tag)
Return the event parameter value whose tag is the passed string. |
Object |
getParameter(String tag)
Return the event parameter value whose tag is the passed string. |
boolean |
hasMetaEvent(MetaEvent metaEvent)
Verifies if this event is associated with a given MetaEvent. |
boolean |
isAllowedParameter(String tag)
|
String |
toString()
Return the string representation of this event. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Event NULL
| Constructor Detail |
|---|
public Event(MetaEvent metaEvent,
Map<String,Object> parameters)
MetaEvent and its actual
parameters. In the parameters map the keys are the parameter names as
defined in the MetaEvent while the values are the parameters
values.
No check on parameters is performed by this constructor. The caller must
ensure that the parameters are valid and compatible with the formal
parameters defined in the MetaEvent.
| Method Detail |
|---|
public boolean hasMetaEvent(MetaEvent metaEvent)
MetaEvent.
metaEvent - the MetaEvent
MetaEvent associted to this
event, false otherwisepublic boolean isAllowedParameter(String tag)
public Object getParameter(String tag)
tag - the tag of the parameter
IllegalArgumentException - if this event has no parameter with the given tagpublic Object getAttribute(String tag)
getAttribute in interface AttributeReaderpublic Map<String,Object> getAllAttributes()
getAllAttributes in interface AttributeReaderpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||