Advertisement
bebesurf

Untitled

Oct 1st, 2018
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1.     public String[] execute(Label[] values) {
  2.         resultat = new String[10];
  3.         Label labTmp;
  4.         int it = 0;
  5.         currentState = initialState;
  6.         while (!(inFinalState(currentState)) && existingStates.contains(currentState)) {
  7.             labTmp = values[it];
  8.             currentState = currentState.giveNextState(labTmp);
  9.             resultat[it] = labTmp.getValue();
  10.             it++;
  11.         }
  12.         if (inFinalState(currentState))
  13.             return resultat;
  14.  
  15.         else {
  16.             resultat[0] = null;
  17.             return resultat;
  18.         }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement