com.googlecode.jinahya.util.fsm
Class Transition

java.lang.Object
  extended by com.googlecode.jinahya.util.fsm.Transition

public class Transition
extends Object

Transition between states.

Author:
Jin Kwon

Constructor Summary
Transition(State source, State target)
          Creates a new instance.
 
Method Summary
 boolean equals(Object obj)
           
 State getSource()
          Returns the source state.
 State getTarget()
          Returns the target state.
 int hashCode()
           
 boolean matchesAll(List<TransitionMatcher> matchers)
          Checks if this transition matches all of given matchers.
 boolean matchesAll(TransitionMatcher... matchers)
          checks if this transition matches all of given matchers.
 boolean matchesAny(List<TransitionMatcher> matchers)
          Checks if this transition matches any of given matchers.
 boolean matchesAny(TransitionMatcher... matchers)
          Checks if this transition matches any of given matchers.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Transition

public Transition(State source,
                  State target)
Creates a new instance.

Parameters:
source - source state
target - target state
Method Detail

getSource

public final State getSource()
Returns the source state.

Returns:
source state

getTarget

public final State getTarget()
Returns the target state.

Returns:
target state

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

matchesAny

public boolean matchesAny(TransitionMatcher... matchers)
Checks if this transition matches any of given matchers.

Parameters:
matchers - matchers
Returns:
true if matches any; false otherwise

matchesAny

public boolean matchesAny(List<TransitionMatcher> matchers)
Checks if this transition matches any of given matchers.

Parameters:
matchers - matchers
Returns:
true if matches any; false otherwise

matchesAll

public boolean matchesAll(TransitionMatcher... matchers)
checks if this transition matches all of given matchers.

Parameters:
matchers - matchers
Returns:
true if matches all; false otherwise

matchesAll

public boolean matchesAll(List<TransitionMatcher> matchers)
Checks if this transition matches all of given matchers.

Parameters:
matchers - matchers
Returns:
true if all matches; false otherwise


Copyright © 2011. All Rights Reserved.