@Test public void equals_and_hashCode() throws Exception { assertThat(new RelationOnSymbols(OP1, SYMBOL1, SYMBOL2)).isEqualTo(new RelationOnSymbols(OP1, SYMBOL1, SYMBOL2)); assertThat(new RelationOnSymbols(OP1, SYMBOL1, SYMBOL2)).isNotEqualTo(new RelationOnSymbols(OP2, SYMBOL1, SYMBOL2)); assertThat(new RelationOnSymbols(OP1, SYMBOL1, SYMBOL2)).isNotEqualTo(new RelationOnSymbols(OP1, SYMBOL1, SYMBOL1)); assertThat(new RelationOnSymbols(OP1, SYMBOL1, SYMBOL2)).isNotEqualTo(new RelationOnSymbols(OP1, SYMBOL2, SYMBOL2)); assertThat(new RelationOnSymbols(OP1, SYMBOL1, SYMBOL2)).isNotEqualTo(null); assertThat(new RelationOnSymbols(OP1, SYMBOL1, SYMBOL2).hashCode()) .isEqualTo(new RelationOnSymbols(OP1, SYMBOL1, SYMBOL2).hashCode()); }
@Override public int hashCode() { return Objects.hash(operator, leftOperand, rightOperand); }
RelationOnSymbols { @Override public int hashCode() { return Objects.hash(operator, leftOperand, rightOperand); } }
RelationOnSymbols { @Override public int hashCode() { return Objects.hash(operator, leftOperand, rightOperand); } RelationOnSymbols(Relation.Operator operator, Symbol leftOperand, Symbol rightOperand); }
RelationOnSymbols { @Override public int hashCode() { return Objects.hash(operator, leftOperand, rightOperand); } RelationOnSymbols(Relation.Operator operator, Symbol leftOperand, Symbol rightOperand); @Override boolean equals(Object obj); @Override int hashCode(); }
RelationOnSymbols { @Override public int hashCode() { return Objects.hash(operator, leftOperand, rightOperand); } RelationOnSymbols(Relation.Operator operator, Symbol leftOperand, Symbol rightOperand); @Override boolean equals(Object obj); @Override int hashCode();  }