sm
Class SMVirtualEvent

java.lang.Object
  extended bysm.SMVirtualEvent

public class SMVirtualEvent
extends java.lang.Object

A virtual event to send to a state machine.

For instance, to send a virtual event "copy" to a state machine sm:

 //Build a virtual event
 SMVirtualEvent copyEvent =  new SMVirtualEvent("copy");
 //Send it to sm
 sm.processEvent(copyEvent);
 
The virtual event can thus be used to fire a transition in sm:
 StateMachine sm = new StateMachine("sm virtual events") {
 		public State s = new State () {
 			Transition t = new Transition("copy") { ... };
 			...
 		};
 		...
 };
 

Author:
Caroline Appert

Constructor Summary
SMVirtualEvent(java.lang.String n)
          Builds a virtual event.
 
Method Summary
 java.lang.String getNameEvent()
          Returns the name of the virtual event.
 void setNameEvent(java.lang.String n)
          Sets the name of a virtual event.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SMVirtualEvent

public SMVirtualEvent(java.lang.String n)
Builds a virtual event.

Parameters:
n - The name of the virtual event.
Method Detail

getNameEvent

public java.lang.String getNameEvent()
Returns the name of the virtual event.

Returns:
The name of the virtual event.

setNameEvent

public void setNameEvent(java.lang.String n)
Sets the name of a virtual event.

Parameters:
n - The name of the virtual event to set.