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

Matcher to implement MatchResult. #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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