jmdp.basic
Class StateEvent<S extends State,E extends Event>
java.lang.Object
jmdp.basic.State
jmdp.basic.StateEvent<S,E>
- All Implemented Interfaces:
- java.lang.Comparable<State>
public class StateEvent<S extends State,E extends Event>
- extends State
This class represents a state compounded of a state and an event. It is used
for state expansion for the problems where actions can depend on the event
that happens in a transition. Only future events that can occur from the
state s should be allowed as events e.
- Author:
- Andres Sarmiento, German Riano - Universidad de Los Andes
Constructor Summary |
StateEvent(S s,
E e)
Builds a new state with the event information |
Method Summary |
int |
compareTo(State i)
|
boolean |
equals(java.lang.Object o)
If Object is not State it returns false. |
E |
getEvent()
|
S |
getState()
|
java.lang.String |
label()
The user MUST override this method to give a (hopefully short) label for the state. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
StateEvent
public StateEvent(S s,
E e)
- Builds a new state with the event information
- Parameters:
s
- statee
- event
getState
public S getState()
- Returns:
- the original state from the state
getEvent
public E getEvent()
- Returns:
- the original event from the state
label
public java.lang.String label()
- Description copied from class:
State
- The user MUST override this method to give a (hopefully short) label for the state.
- Specified by:
label
in class State
- Returns:
- short description of the state.
equals
public final boolean equals(java.lang.Object o)
- Description copied from class:
State
- If Object is not State it returns false. Otherwise
equals := (compareTo(o)==0)
- Overrides:
equals
in class State
- See Also:
Object.equals(java.lang.Object)
compareTo
public int compareTo(State i)