public ArrayList < Transition > possibleNextStates ( Automaton source ) { ArrayList < Transition > r = possibleTransitions . get ( source ) ; if ( r == null ) { throw new UnsupportedOperationException ( "Not transitions registered from " + source . getName ( ) + ", automaton " + this . getName ( ) ) ; } ArrayList < Transition > activatedTransitions = new ArrayList < Transition > ( ) ; for ( Transition t : r ) { if ( t . evaluate ( ) ) { activatedTransitions . add ( t ) ; } } ; return activatedTransitions ; }
Dado un estado se devuelve una lista con los posibles estados que le siguen en el protocolo .