diff --git a/app/src/main/java/lightcontainer/protocol/ProtocolWriter.java b/app/src/main/java/lightcontainer/protocol/ProtocolWriter.java new file mode 100644 index 0000000..c05e428 --- /dev/null +++ b/app/src/main/java/lightcontainer/protocol/ProtocolWriter.java @@ -0,0 +1,23 @@ +package lightcontainer.protocol; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public abstract class ProtocolWriter { + + private final Pattern rulePattern; + + protected ProtocolWriter(String pattern) { + this.rulePattern = Pattern.compile(pattern); + } + + public String execute(String data) { + Matcher ruleMatcher = this.rulePattern.matcher(data); + + if (ruleMatcher.matches()) { + + } + + return null; + } +}