class Rule implements JsonObjectConvertible {

    @Override
    public boolean equals(final Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Rule rule = (Rule) o;
        return type == rule.type &&
                pattern.pattern().equals(rule.pattern.pattern());
    }

    public  Rule(final RuleType type, final Pattern pattern);

}