Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
Matcher to implement MatchResult.
Browse files Browse the repository at this point in the history
  • Loading branch information
4ntoine committed Mar 10, 2021
1 parent 48442f4 commit d63c993
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/com/humio/jitrex/Matcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
import com.humio.jitrex.util.Regex;

import java.util.*;
import java.util.regex.MatchResult;

public class Matcher {
public class Matcher implements MatchResult {
private final Pattern pattern;
protected CharSequence input;
protected final Regex re;
Expand Down Expand Up @@ -54,6 +55,10 @@ public int compare(Pattern.VarEntry o1, Pattern.VarEntry o2) {

private static Map<String,String> EMPTY_MAP = new HashMap<>();

public Pattern pattern() {
return pattern;
}

public void reset() {
reset(input, EMPTY_MAP);
}
Expand Down

0 comments on commit d63c993

Please sign in to comment.