Exemple #1
0
  /**
   * Matches.
   *
   * @param src the src
   * @return true, if successful
   */
  public boolean matches(String src) {
    if (pattern == null) {
      pattern = new Pattern(url);
    }

    return pattern.matches(src);
  }
Exemple #2
0
  /**
   * Replacement.
   *
   * @param src the src
   * @return the string
   */
  public String replacement(String src) {
    if (pattern == null) {
      pattern = new Pattern(url);
    }

    if (replacer == null) {
      replacer = pattern.replacer(dest);
    }

    String result = replacer.replace(src);
    return result;
  }