org.jmock.internal
Class StateMachine

java.lang.Object
  extended by org.jmock.internal.StateMachine
All Implemented Interfaces:
org.hamcrest.SelfDescribing, States, StatesClause

public class StateMachine
extends Object
implements States


Constructor Summary
StateMachine(String name)
           
 
Method Summary
 void become(String nextState)
          Put the state machine into state nextState.
 void describeTo(org.hamcrest.Description description)
           
 State is(String state)
           
 StatePredicate isNot(String state)
           
 States startsAs(String initialState)
          Put the state machine into state initialState.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StateMachine

public StateMachine(String name)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

startsAs

public States startsAs(String initialState)
Description copied from interface: States
Put the state machine into state initialState.

Specified by:
startsAs in interface States
Parameters:
initialState - The initial state of the state machine.
Returns:
Itself.

become

public void become(String nextState)
Description copied from interface: States
Put the state machine into state nextState.

Specified by:
become in interface States
Parameters:
nextState - The next state of the state machine.

is

public State is(String state)
Specified by:
is in interface StatesClause

isNot

public StatePredicate isNot(String state)
Specified by:
isNot in interface StatesClause

describeTo

public void describeTo(org.hamcrest.Description description)
Specified by:
describeTo in interface org.hamcrest.SelfDescribing


Copyright © 2003-2012 jMock. All Rights Reserved.