boolean compareLists(AnalyzedTokenReadings[] tokens, int startIndex, int endIndex, Pattern[] patterns) {
    if (startIndex < 0) {
      return false;
    }
    int i = 0;
    for (int j = startIndex; j <= endIndex; j++) {
      if (i >= patterns.length || j >= tokens.length || !patterns[i].matcher(tokens[j].getToken()).matches()) {
        return false;
      }
      i++;
    }
    return true;
  }
boolean compareLists ( AnalyzedTokenReadings [ ] tokens , int startIndex , int endIndex , Pattern [ ] patterns ) { if ( startIndex < 0 ) { return false ; } int i = 0 ; for ( int j = startIndex ; j <= endIndex ; j ++ ) { if ( i >= patterns . length || j >= tokens . length || ! patterns [ i ] . matcher ( tokens [ j ] . getToken ( ) ) . matches ( ) ) { return false ; } i ++ ; } return true ; }
non-private for tests