Java Code Examples for com.sun.corba.se.spi.orbutil.fsm.StateEngine#add()
The following examples show how to use
com.sun.corba.se.spi.orbutil.fsm.StateEngine#add() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FSMTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
private static void add1( StateEngine se, State oldState, Input in, State newState ) { se.add( oldState, in, new TestAction1( oldState, in, newState ), newState ) ; }
Example 2
Source File: FSMTest.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public static void main( String[] args ) { TestAction3 ta3 = new TestAction3( STATE3, INPUT1 ) ; StateEngine se = StateEngineFactory.create() ; add1( se, STATE1, INPUT1, STATE1 ) ; add2( se, STATE1, STATE2 ) ; add1( se, STATE2, INPUT1, STATE2 ) ; add1( se, STATE2, INPUT2, STATE2 ) ; add1( se, STATE2, INPUT3, STATE1 ) ; add1( se, STATE2, INPUT4, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE4 ) ; add1( se, STATE3, INPUT2, STATE1 ) ; add1( se, STATE3, INPUT3, STATE2 ) ; add1( se, STATE3, INPUT4, STATE2 ) ; MyFSM fsm = new MyFSM( se ) ; TestInput in11 = new TestInput( INPUT1, "1.1" ) ; TestInput in12 = new TestInput( INPUT1, "1.2" ) ; TestInput in21 = new TestInput( INPUT2, "2.1" ) ; TestInput in22 = new TestInput( INPUT2, "2.2" ) ; TestInput in31 = new TestInput( INPUT3, "3.1" ) ; TestInput in32 = new TestInput( INPUT3, "3.2" ) ; TestInput in33 = new TestInput( INPUT3, "3.3" ) ; TestInput in41 = new TestInput( INPUT4, "4.1" ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in31.getInput() ) ; fsm.doIt( in33.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in32.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; }
Example 3
Source File: FSMTest.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
private static void add1( StateEngine se, State oldState, Input in, State newState ) { se.add( oldState, in, new TestAction1( oldState, in, newState ), newState ) ; }
Example 4
Source File: FSMTest.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public static void main( String[] args ) { TestAction3 ta3 = new TestAction3( STATE3, INPUT1 ) ; StateEngine se = StateEngineFactory.create() ; add1( se, STATE1, INPUT1, STATE1 ) ; add2( se, STATE1, STATE2 ) ; add1( se, STATE2, INPUT1, STATE2 ) ; add1( se, STATE2, INPUT2, STATE2 ) ; add1( se, STATE2, INPUT3, STATE1 ) ; add1( se, STATE2, INPUT4, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE4 ) ; add1( se, STATE3, INPUT2, STATE1 ) ; add1( se, STATE3, INPUT3, STATE2 ) ; add1( se, STATE3, INPUT4, STATE2 ) ; MyFSM fsm = new MyFSM( se ) ; TestInput in11 = new TestInput( INPUT1, "1.1" ) ; TestInput in12 = new TestInput( INPUT1, "1.2" ) ; TestInput in21 = new TestInput( INPUT2, "2.1" ) ; TestInput in22 = new TestInput( INPUT2, "2.2" ) ; TestInput in31 = new TestInput( INPUT3, "3.1" ) ; TestInput in32 = new TestInput( INPUT3, "3.2" ) ; TestInput in33 = new TestInput( INPUT3, "3.3" ) ; TestInput in41 = new TestInput( INPUT4, "4.1" ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in31.getInput() ) ; fsm.doIt( in33.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in32.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; }
Example 5
Source File: FSMTest.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
private static void add1( StateEngine se, State oldState, Input in, State newState ) { se.add( oldState, in, new TestAction1( oldState, in, newState ), newState ) ; }
Example 6
Source File: FSMTest.java From hottub with GNU General Public License v2.0 | 4 votes |
public static void main( String[] args ) { TestAction3 ta3 = new TestAction3( STATE3, INPUT1 ) ; StateEngine se = StateEngineFactory.create() ; add1( se, STATE1, INPUT1, STATE1 ) ; add2( se, STATE1, STATE2 ) ; add1( se, STATE2, INPUT1, STATE2 ) ; add1( se, STATE2, INPUT2, STATE2 ) ; add1( se, STATE2, INPUT3, STATE1 ) ; add1( se, STATE2, INPUT4, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE4 ) ; add1( se, STATE3, INPUT2, STATE1 ) ; add1( se, STATE3, INPUT3, STATE2 ) ; add1( se, STATE3, INPUT4, STATE2 ) ; MyFSM fsm = new MyFSM( se ) ; TestInput in11 = new TestInput( INPUT1, "1.1" ) ; TestInput in12 = new TestInput( INPUT1, "1.2" ) ; TestInput in21 = new TestInput( INPUT2, "2.1" ) ; TestInput in22 = new TestInput( INPUT2, "2.2" ) ; TestInput in31 = new TestInput( INPUT3, "3.1" ) ; TestInput in32 = new TestInput( INPUT3, "3.2" ) ; TestInput in33 = new TestInput( INPUT3, "3.3" ) ; TestInput in41 = new TestInput( INPUT4, "4.1" ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in31.getInput() ) ; fsm.doIt( in33.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in32.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; }
Example 7
Source File: FSMTest.java From hottub with GNU General Public License v2.0 | 4 votes |
private static void add1( StateEngine se, State oldState, Input in, State newState ) { se.add( oldState, in, new TestAction1( oldState, in, newState ), newState ) ; }
Example 8
Source File: FSMTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public static void main( String[] args ) { TestAction3 ta3 = new TestAction3( STATE3, INPUT1 ) ; StateEngine se = StateEngineFactory.create() ; add1( se, STATE1, INPUT1, STATE1 ) ; add2( se, STATE1, STATE2 ) ; add1( se, STATE2, INPUT1, STATE2 ) ; add1( se, STATE2, INPUT2, STATE2 ) ; add1( se, STATE2, INPUT3, STATE1 ) ; add1( se, STATE2, INPUT4, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE4 ) ; add1( se, STATE3, INPUT2, STATE1 ) ; add1( se, STATE3, INPUT3, STATE2 ) ; add1( se, STATE3, INPUT4, STATE2 ) ; MyFSM fsm = new MyFSM( se ) ; TestInput in11 = new TestInput( INPUT1, "1.1" ) ; TestInput in12 = new TestInput( INPUT1, "1.2" ) ; TestInput in21 = new TestInput( INPUT2, "2.1" ) ; TestInput in22 = new TestInput( INPUT2, "2.2" ) ; TestInput in31 = new TestInput( INPUT3, "3.1" ) ; TestInput in32 = new TestInput( INPUT3, "3.2" ) ; TestInput in33 = new TestInput( INPUT3, "3.3" ) ; TestInput in41 = new TestInput( INPUT4, "4.1" ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in31.getInput() ) ; fsm.doIt( in33.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in32.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; }
Example 9
Source File: FSMTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
private static void add1( StateEngine se, State oldState, Input in, State newState ) { se.add( oldState, in, new TestAction1( oldState, in, newState ), newState ) ; }
Example 10
Source File: FSMTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public static void main( String[] args ) { TestAction3 ta3 = new TestAction3( STATE3, INPUT1 ) ; StateEngine se = StateEngineFactory.create() ; add1( se, STATE1, INPUT1, STATE1 ) ; add2( se, STATE1, STATE2 ) ; add1( se, STATE2, INPUT1, STATE2 ) ; add1( se, STATE2, INPUT2, STATE2 ) ; add1( se, STATE2, INPUT3, STATE1 ) ; add1( se, STATE2, INPUT4, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE4 ) ; add1( se, STATE3, INPUT2, STATE1 ) ; add1( se, STATE3, INPUT3, STATE2 ) ; add1( se, STATE3, INPUT4, STATE2 ) ; MyFSM fsm = new MyFSM( se ) ; TestInput in11 = new TestInput( INPUT1, "1.1" ) ; TestInput in12 = new TestInput( INPUT1, "1.2" ) ; TestInput in21 = new TestInput( INPUT2, "2.1" ) ; TestInput in22 = new TestInput( INPUT2, "2.2" ) ; TestInput in31 = new TestInput( INPUT3, "3.1" ) ; TestInput in32 = new TestInput( INPUT3, "3.2" ) ; TestInput in33 = new TestInput( INPUT3, "3.3" ) ; TestInput in41 = new TestInput( INPUT4, "4.1" ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in31.getInput() ) ; fsm.doIt( in33.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in32.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; }
Example 11
Source File: FSMTest.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
private static void add1( StateEngine se, State oldState, Input in, State newState ) { se.add( oldState, in, new TestAction1( oldState, in, newState ), newState ) ; }
Example 12
Source File: FSMTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public static void main( String[] args ) { TestAction3 ta3 = new TestAction3( STATE3, INPUT1 ) ; StateEngine se = StateEngineFactory.create() ; add1( se, STATE1, INPUT1, STATE1 ) ; add2( se, STATE1, STATE2 ) ; add1( se, STATE2, INPUT1, STATE2 ) ; add1( se, STATE2, INPUT2, STATE2 ) ; add1( se, STATE2, INPUT3, STATE1 ) ; add1( se, STATE2, INPUT4, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE4 ) ; add1( se, STATE3, INPUT2, STATE1 ) ; add1( se, STATE3, INPUT3, STATE2 ) ; add1( se, STATE3, INPUT4, STATE2 ) ; MyFSM fsm = new MyFSM( se ) ; TestInput in11 = new TestInput( INPUT1, "1.1" ) ; TestInput in12 = new TestInput( INPUT1, "1.2" ) ; TestInput in21 = new TestInput( INPUT2, "2.1" ) ; TestInput in22 = new TestInput( INPUT2, "2.2" ) ; TestInput in31 = new TestInput( INPUT3, "3.1" ) ; TestInput in32 = new TestInput( INPUT3, "3.2" ) ; TestInput in33 = new TestInput( INPUT3, "3.3" ) ; TestInput in41 = new TestInput( INPUT4, "4.1" ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in31.getInput() ) ; fsm.doIt( in33.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in32.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; }
Example 13
Source File: FSMTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
private static void add1( StateEngine se, State oldState, Input in, State newState ) { se.add( oldState, in, new TestAction1( oldState, in, newState ), newState ) ; }
Example 14
Source File: FSMTest.java From JDKSourceCode1.8 with MIT License | 4 votes |
public static void main( String[] args ) { TestAction3 ta3 = new TestAction3( STATE3, INPUT1 ) ; StateEngine se = StateEngineFactory.create() ; add1( se, STATE1, INPUT1, STATE1 ) ; add2( se, STATE1, STATE2 ) ; add1( se, STATE2, INPUT1, STATE2 ) ; add1( se, STATE2, INPUT2, STATE2 ) ; add1( se, STATE2, INPUT3, STATE1 ) ; add1( se, STATE2, INPUT4, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE4 ) ; add1( se, STATE3, INPUT2, STATE1 ) ; add1( se, STATE3, INPUT3, STATE2 ) ; add1( se, STATE3, INPUT4, STATE2 ) ; MyFSM fsm = new MyFSM( se ) ; TestInput in11 = new TestInput( INPUT1, "1.1" ) ; TestInput in12 = new TestInput( INPUT1, "1.2" ) ; TestInput in21 = new TestInput( INPUT2, "2.1" ) ; TestInput in22 = new TestInput( INPUT2, "2.2" ) ; TestInput in31 = new TestInput( INPUT3, "3.1" ) ; TestInput in32 = new TestInput( INPUT3, "3.2" ) ; TestInput in33 = new TestInput( INPUT3, "3.3" ) ; TestInput in41 = new TestInput( INPUT4, "4.1" ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in31.getInput() ) ; fsm.doIt( in33.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in32.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; }
Example 15
Source File: FSMTest.java From JDKSourceCode1.8 with MIT License | 4 votes |
private static void add1( StateEngine se, State oldState, Input in, State newState ) { se.add( oldState, in, new TestAction1( oldState, in, newState ), newState ) ; }
Example 16
Source File: FSMTest.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public static void main( String[] args ) { TestAction3 ta3 = new TestAction3( STATE3, INPUT1 ) ; StateEngine se = StateEngineFactory.create() ; add1( se, STATE1, INPUT1, STATE1 ) ; add2( se, STATE1, STATE2 ) ; add1( se, STATE2, INPUT1, STATE2 ) ; add1( se, STATE2, INPUT2, STATE2 ) ; add1( se, STATE2, INPUT3, STATE1 ) ; add1( se, STATE2, INPUT4, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE4 ) ; add1( se, STATE3, INPUT2, STATE1 ) ; add1( se, STATE3, INPUT3, STATE2 ) ; add1( se, STATE3, INPUT4, STATE2 ) ; MyFSM fsm = new MyFSM( se ) ; TestInput in11 = new TestInput( INPUT1, "1.1" ) ; TestInput in12 = new TestInput( INPUT1, "1.2" ) ; TestInput in21 = new TestInput( INPUT2, "2.1" ) ; TestInput in22 = new TestInput( INPUT2, "2.2" ) ; TestInput in31 = new TestInput( INPUT3, "3.1" ) ; TestInput in32 = new TestInput( INPUT3, "3.2" ) ; TestInput in33 = new TestInput( INPUT3, "3.3" ) ; TestInput in41 = new TestInput( INPUT4, "4.1" ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in31.getInput() ) ; fsm.doIt( in33.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in32.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; }
Example 17
Source File: FSMTest.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
private static void add1( StateEngine se, State oldState, Input in, State newState ) { se.add( oldState, in, new TestAction1( oldState, in, newState ), newState ) ; }
Example 18
Source File: FSMTest.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public static void main( String[] args ) { TestAction3 ta3 = new TestAction3( STATE3, INPUT1 ) ; StateEngine se = StateEngineFactory.create() ; add1( se, STATE1, INPUT1, STATE1 ) ; add2( se, STATE1, STATE2 ) ; add1( se, STATE2, INPUT1, STATE2 ) ; add1( se, STATE2, INPUT2, STATE2 ) ; add1( se, STATE2, INPUT3, STATE1 ) ; add1( se, STATE2, INPUT4, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE4 ) ; add1( se, STATE3, INPUT2, STATE1 ) ; add1( se, STATE3, INPUT3, STATE2 ) ; add1( se, STATE3, INPUT4, STATE2 ) ; MyFSM fsm = new MyFSM( se ) ; TestInput in11 = new TestInput( INPUT1, "1.1" ) ; TestInput in12 = new TestInput( INPUT1, "1.2" ) ; TestInput in21 = new TestInput( INPUT2, "2.1" ) ; TestInput in22 = new TestInput( INPUT2, "2.2" ) ; TestInput in31 = new TestInput( INPUT3, "3.1" ) ; TestInput in32 = new TestInput( INPUT3, "3.2" ) ; TestInput in33 = new TestInput( INPUT3, "3.3" ) ; TestInput in41 = new TestInput( INPUT4, "4.1" ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in31.getInput() ) ; fsm.doIt( in33.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in32.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; }
Example 19
Source File: FSMTest.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
private static void add1( StateEngine se, State oldState, Input in, State newState ) { se.add( oldState, in, new TestAction1( oldState, in, newState ), newState ) ; }
Example 20
Source File: FSMTest.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
public static void main( String[] args ) { TestAction3 ta3 = new TestAction3( STATE3, INPUT1 ) ; StateEngine se = StateEngineFactory.create() ; add1( se, STATE1, INPUT1, STATE1 ) ; add2( se, STATE1, STATE2 ) ; add1( se, STATE2, INPUT1, STATE2 ) ; add1( se, STATE2, INPUT2, STATE2 ) ; add1( se, STATE2, INPUT3, STATE1 ) ; add1( se, STATE2, INPUT4, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE3 ) ; se.add( STATE3, INPUT1, ta3, STATE4 ) ; add1( se, STATE3, INPUT2, STATE1 ) ; add1( se, STATE3, INPUT3, STATE2 ) ; add1( se, STATE3, INPUT4, STATE2 ) ; MyFSM fsm = new MyFSM( se ) ; TestInput in11 = new TestInput( INPUT1, "1.1" ) ; TestInput in12 = new TestInput( INPUT1, "1.2" ) ; TestInput in21 = new TestInput( INPUT2, "2.1" ) ; TestInput in22 = new TestInput( INPUT2, "2.2" ) ; TestInput in31 = new TestInput( INPUT3, "3.1" ) ; TestInput in32 = new TestInput( INPUT3, "3.2" ) ; TestInput in33 = new TestInput( INPUT3, "3.3" ) ; TestInput in41 = new TestInput( INPUT4, "4.1" ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in31.getInput() ) ; fsm.doIt( in33.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in22.getInput() ) ; fsm.doIt( in32.getInput() ) ; fsm.doIt( in41.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in12.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; fsm.doIt( in11.getInput() ) ; }