@Test public void inequality() { MatchStatement ms = new MatchStatement( singletonMap("G", matcher), EMPTY_MAP, Optional.of(pred), singleton(rs)); MatchStatement ms_different_alias = new MatchStatement( singletonMap("H", matcher), EMPTY_MAP, Optional.of(pred), singleton(rs)); MatchStatement ms_different_predicate = new MatchStatement( singletonMap("G", matcher), EMPTY_MAP, Optional.of(TimeSeriesMetricExpression.TRUE), singleton(rs)); MatchStatement ms_no_predicate = new MatchStatement( singletonMap("G", matcher), EMPTY_MAP, Optional.of(TimeSeriesMetricExpression.TRUE), singleton(rs)); MatchStatement ms_different_body = new MatchStatement( singletonMap("G", matcher), EMPTY_MAP, Optional.of(pred), Arrays.asList(rs, rs)); assertFalse(ms.equals(ms_different_alias)); assertFalse(ms.equals(ms_different_predicate)); assertFalse(ms.equals(ms_no_predicate)); assertFalse(ms.equals(ms_different_body)); assertFalse(ms.equals(new Object())); assertFalse(ms.equals(null)); }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final MatchStatement other = (MatchStatement) obj; if (!Objects.equals(this.group_matchers_, other.group_matchers_)) { return false; } if (!Objects.equals(this.metric_matchers_, other.metric_matchers_)) { return false; } if (!Objects.equals(this.where_clause_, other.where_clause_)) { return false; } if (!Objects.equals(this.rules_, other.rules_)) { return false; } return true; }
MatchStatement implements RuleStatement { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final MatchStatement other = (MatchStatement) obj; if (!Objects.equals(this.group_matchers_, other.group_matchers_)) { return false; } if (!Objects.equals(this.metric_matchers_, other.metric_matchers_)) { return false; } if (!Objects.equals(this.where_clause_, other.where_clause_)) { return false; } if (!Objects.equals(this.rules_, other.rules_)) { return false; } return true; } }
MatchStatement implements RuleStatement { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final MatchStatement other = (MatchStatement) obj; if (!Objects.equals(this.group_matchers_, other.group_matchers_)) { return false; } if (!Objects.equals(this.metric_matchers_, other.metric_matchers_)) { return false; } if (!Objects.equals(this.where_clause_, other.where_clause_)) { return false; } if (!Objects.equals(this.rules_, other.rules_)) { return false; } return true; } MatchStatement(Map<String, PathMatcher> group_matchers,
            Map<IdentifierPair, MetricMatcher> metric_matchers,
            Optional<TimeSeriesMetricExpression> where_clause,
            Collection<RuleStatement> rules); }
MatchStatement implements RuleStatement { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final MatchStatement other = (MatchStatement) obj; if (!Objects.equals(this.group_matchers_, other.group_matchers_)) { return false; } if (!Objects.equals(this.metric_matchers_, other.metric_matchers_)) { return false; } if (!Objects.equals(this.where_clause_, other.where_clause_)) { return false; } if (!Objects.equals(this.rules_, other.rules_)) { return false; } return true; } MatchStatement(Map<String, PathMatcher> group_matchers,
            Map<IdentifierPair, MetricMatcher> metric_matchers,
            Optional<TimeSeriesMetricExpression> where_clause,
            Collection<RuleStatement> rules); @Override MatchTransformerImpl get(); @Override StringBuilder configString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
MatchStatement implements RuleStatement { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final MatchStatement other = (MatchStatement) obj; if (!Objects.equals(this.group_matchers_, other.group_matchers_)) { return false; } if (!Objects.equals(this.metric_matchers_, other.metric_matchers_)) { return false; } if (!Objects.equals(this.where_clause_, other.where_clause_)) { return false; } if (!Objects.equals(this.rules_, other.rules_)) { return false; } return true; } MatchStatement(Map<String, PathMatcher> group_matchers,
            Map<IdentifierPair, MetricMatcher> metric_matchers,
            Optional<TimeSeriesMetricExpression> where_clause,
            Collection<RuleStatement> rules); @Override MatchTransformerImpl get(); @Override StringBuilder configString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }