code: boolean match(String candidate) {
      char[] chars = candidate.toCharArray();
      int[] cursor = new int[] {0, chars.length};
      if (!checkPrefix(chars, cursor))
        return false;
      if (prefix == suffix && midClauses == null)
        // The pattern consists only of the prefix, which must exhaust the string
        return cursor[0] == cursor[1];
      if (!checkSuffix(chars, cursor))
        return false;
      return matchMiddle(chars, cursor[0], cursor[1]);
    }
docs: Match a String against this pattern (used by the Evaluator)
  @param candidate the String to be matched
  @return true if the candidate matches, false otherwise