code: public boolean nextIs(PatternConstant constant) {
          char[] cs = constant.getCharArray();
          int length = cs.length;
  
          if (length > textLength - offset) {
              return false;
          }
  
          if (!constant.isIgnoreCase()) {
              int i;
              //noinspection StatementWithEmptyBody
              for (i = 0; i < length && text[offset + i] == cs[i]; i++);
              return i == length;
          } else {
              for (int i = 0; i < length; i++) {
                  char ct = text[offset + i];
                  char cv = cs[i];
                  if (
                          ct == cv ||
                                  Character.toUpperCase(ct) == Character.toUpperCase(cv) ||
                                  Character.toLowerCase(ct) == Character.toLowerCase(cv)
                          ) {
                      continue;
                  }
                  return false;
              }
              return true;
          }
      }
docs: Test id next sequence the constant?
  
  @param constant constant pattern element
  @return true if next sub sequence is constant.