@Test void equals() { QueryRule q1 = new QueryRule("field", EQUALS, "test"); QueryRule q2 = new QueryRule("field", EQUALS, "test"); assertTrue(q1.equals(q2)); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof QueryRule)) { return false; } QueryRule queryRule = (QueryRule) o; return getOperator() == queryRule.getOperator() && Objects.equals(getField(), queryRule.getField()) && Objects.equals(getValue(), queryRule.getValue()) && Objects.equals(getNestedRules(), queryRule.getNestedRules()); }
QueryRule { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof QueryRule)) { return false; } QueryRule queryRule = (QueryRule) o; return getOperator() == queryRule.getOperator() && Objects.equals(getField(), queryRule.getField()) && Objects.equals(getValue(), queryRule.getValue()) && Objects.equals(getNestedRules(), queryRule.getNestedRules()); } }
QueryRule { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof QueryRule)) { return false; } QueryRule queryRule = (QueryRule) o; return getOperator() == queryRule.getOperator() && Objects.equals(getField(), queryRule.getField()) && Objects.equals(getValue(), queryRule.getValue()) && Objects.equals(getNestedRules(), queryRule.getNestedRules()); } QueryRule();  QueryRule(List<QueryRule> nestedRules);  QueryRule(QueryRule copy);  QueryRule(String field, Operator operator, Object value); @SuppressWarnings("unchecked")  QueryRule(Operator operator, Object value);  QueryRule(Operator operator, QueryRule nestedRules);  QueryRule(Operator operator);  QueryRule(String field, Operator equals, String value); }
QueryRule { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof QueryRule)) { return false; } QueryRule queryRule = (QueryRule) o; return getOperator() == queryRule.getOperator() && Objects.equals(getField(), queryRule.getField()) && Objects.equals(getValue(), queryRule.getValue()) && Objects.equals(getNestedRules(), queryRule.getNestedRules()); } QueryRule();  QueryRule(List<QueryRule> nestedRules);  QueryRule(QueryRule copy);  QueryRule(String field, Operator operator, Object value); @SuppressWarnings("unchecked")  QueryRule(Operator operator, Object value);  QueryRule(Operator operator, QueryRule nestedRules);  QueryRule(Operator operator);  QueryRule(String field, Operator equals, String value); String getField(); void setField(String field); Operator getOperator(); void setOperator(Operator operator); Object getValue(); void setValue(Object value); List<QueryRule> getNestedRules(); @Override String toString(); static QueryRule eq(String name, Object value); @Override boolean equals(Object o); @Override int hashCode(); }
QueryRule { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof QueryRule)) { return false; } QueryRule queryRule = (QueryRule) o; return getOperator() == queryRule.getOperator() && Objects.equals(getField(), queryRule.getField()) && Objects.equals(getValue(), queryRule.getValue()) && Objects.equals(getNestedRules(), queryRule.getNestedRules()); } QueryRule();  QueryRule(List<QueryRule> nestedRules);  QueryRule(QueryRule copy);  QueryRule(String field, Operator operator, Object value); @SuppressWarnings("unchecked")  QueryRule(Operator operator, Object value);  QueryRule(Operator operator, QueryRule nestedRules);  QueryRule(Operator operator);  QueryRule(String field, Operator equals, String value); String getField(); void setField(String field); Operator getOperator(); void setOperator(Operator operator); Object getValue(); void setValue(Object value); List<QueryRule> getNestedRules(); @Override String toString(); static QueryRule eq(String name, Object value); @Override boolean equals(Object o); @Override int hashCode();  }