public boolean run(String s){
  int p=0;
  int l=s.length();
  for (int i=0, cp=0; i < l; i+=Character.charCount(cp)) {
    p=step(p,cp=s.codePointAt(i));
    if (p == -1)     return false;
  }
  return accept[p];
}

public boolean run ( String s ) { int p = 0 ; int l = s . length ( ) ; for ( int i = 0 , cp = 0 ; i < l ; i += Character . charCount ( cp ) ) { p = step ( p , cp = s . codePointAt ( i ) ) ; if ( p == - 1 ) return false ; } return accept [ p ] ; }
returns true if the given string is accepted by this automaton .
