protected boolean validOutcome ( String outcome , Sequence sequence ) { if ( outcome . equals ( CONTINUE ) ) { List tags = sequence . getOutcomes ( ) ; int li = tags . size ( ) - 1 ; if ( li == - 1 ) { return false ; } else if ( ( ( String ) tags . get ( li ) ) . equals ( OTHER ) ) { return false ; } } return true ; }
This method determines wheter the outcome is valid for the preceeding sequence . This can be used to implement constraints on what sequences are valid .