code: public boolean matches(CharSequence input) {
          separatorCount = -1;
          separatorIndex = 0;
  
          if (input == null) {
              this.input = null;
              separatorFlags = null;
              return false;
          }
  
          this.input = input;
          separatorFlags = new int[input.length()];
  
          boolean result = matches(pattern, input, separatorFlags);
  
          if (result) {
              for (int i = separatorFlags.length - 1; i >= 0; i--) {
                  if (separatorFlags[i] > 0) {
                      separatorCount = separatorFlags[i];
                      break;
                  }
              }
          }
  
          return result;
      }
docs: Checks whether a string matches a given wildcard pattern.
  
  @param input the input string
  @return {@code true} if string matches the pattern, otherwise {@code false}