java.lang.Object |
↳ |
es.usc.citius.hipster.model.Transition<A, S> |
Known Direct Subclasses
SimpleTransition<S> |
A SimpleTransition is just a transition without explicit actions Transition<Void,S> . |
|
Class Overview
Defines a transition between states. When two states are connected
a transition exists between them. An action may be specified
to be part of a transition, which is needed in some kind of problems
to evaluate their cost.
When the problem does not involve actions, this class is used
as follows: Transition<Void,S>
Summary
Public Constructors |
|
Transition(A action, S state)
Constructor for transitions which does not store information about
the parent state.
|
|
Transition(S fromState, A action, S toState)
Constructor for transitions that store the
state from which the transition comes from.
|
Public Methods |
static
<S>
Transition<Void, S>
|
create(S fromState, S toState)
Offers a way to instantiate a transition without specifying an action but
only the origin and destination states.
|
static
<A, S>
Transition<A, S>
|
create(S fromState, A action, S toState)
Instantiates a transition specifying an action, the origin and
destination states.
|
A
|
getAction()
|
S
|
getFromState()
|
S
|
getState()
|
void
|
setAction(A action)
|
void
|
setState(S state)
|
String
|
toString()
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
Public Constructors
public
Transition
(A action, S state)
Constructor for transitions which does not store information about
the parent state.
Parameters
action |
action associated to this transition |
state |
to which this transition is addressed
|
public
Transition
(S fromState, A action, S toState)
Constructor for transitions that store the
state from which the transition comes from.
Parameters
fromState |
state origin of the transition |
action |
action associated to this transition |
toState |
state destination of the transition |
See Also
- {@link #create(Object, Object, Object)}
Public Methods
public
static
Transition<Void, S>
create
(S fromState, S toState)
Offers a way to instantiate a transition without specifying an action but
only the origin and destination states.
Parameters
fromState |
state origin of the transition |
toState |
state destination of the transition |
Returns
- instance of a transition with an origin and destination, but without an action
public
static
Transition<A, S>
create
(S fromState, A action, S toState)
Instantiates a transition specifying an action, the origin and
destination states.
Parameters
fromState |
state origin of the transition |
action |
action associated to this transition |
toState |
state destination of the transition |
Returns
- instance of a transition with an origin, destination and action
public
A
getAction
()
Returns
- action associated to this transition
public
S
getFromState
()
Returns
- state origin of this transition
public
S
getState
()
Returns
- state which this transition is addressed
public
void
setAction
(A action)
Parameters
action |
new action for this transition
|
public
void
setState
(S state)
Parameters
state |
new state destination of this transition
|
public
String
toString
()