public SingleLineCommand2(RegexConcat pattern) { if (pattern == null) { throw new IllegalArgumentException(); } if (pattern.getPattern().startsWith("^") == false || pattern.getPattern().endsWith("$") == false) { throw new IllegalArgumentException("Bad pattern " + pattern.getPattern()); } this.pattern = pattern; }
public String[] getDescription() { return new String[] {pattern.getPattern()}; }