@Test public void testEquals() throws IOException { assertEquals(new ArrayAddExpression(Path.EMPTY, UpdateOperator._set, null), new ArrayAddExpression(Path.EMPTY, UpdateOperator._set, null)); ArrayAddExpression instance = new ArrayAddExpression(Path.EMPTY, UpdateOperator._set, null); assertFalse(instance.equals(null)); assertFalse(instance.equals("")); assertFalse(instance.equals(ArrayAddExpression.fromJson((ObjectNode) JsonUtils.json("{\"$append\":{\"\":{\"$valueof\":\"\"}}}")))); assertFalse(instance.equals(new ArrayAddExpression(Path.EMPTY, UpdateOperator._add, null))); assertFalse(instance.equals(new ArrayAddExpression(Path.ANYPATH, UpdateOperator._set, null))); }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ArrayAddExpression other = (ArrayAddExpression) obj; if (!Objects.equals(this.values, other.values)) { return false; } if (this.op != other.op) { return false; } if (!Objects.equals(this.field, other.field)) { return false; } return true; }
ArrayAddExpression extends ArrayUpdateExpression { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ArrayAddExpression other = (ArrayAddExpression) obj; if (!Objects.equals(this.values, other.values)) { return false; } if (this.op != other.op) { return false; } if (!Objects.equals(this.field, other.field)) { return false; } return true; } }
ArrayAddExpression extends ArrayUpdateExpression { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ArrayAddExpression other = (ArrayAddExpression) obj; if (!Objects.equals(this.values, other.values)) { return false; } if (this.op != other.op) { return false; } if (!Objects.equals(this.field, other.field)) { return false; } return true; } ArrayAddExpression(Path field, UpdateOperator op, List<RValueExpression> list); }
ArrayAddExpression extends ArrayUpdateExpression { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ArrayAddExpression other = (ArrayAddExpression) obj; if (!Objects.equals(this.values, other.values)) { return false; } if (this.op != other.op) { return false; } if (!Objects.equals(this.field, other.field)) { return false; } return true; } ArrayAddExpression(Path field, UpdateOperator op, List<RValueExpression> list); Path getField(); List<RValueExpression> getValues(); UpdateOperator getOp(); @Override JsonNode toJson(); static ArrayAddExpression fromJson(ObjectNode node); @Override int hashCode(); @Override boolean equals(Object obj); }
ArrayAddExpression extends ArrayUpdateExpression { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ArrayAddExpression other = (ArrayAddExpression) obj; if (!Objects.equals(this.values, other.values)) { return false; } if (this.op != other.op) { return false; } if (!Objects.equals(this.field, other.field)) { return false; } return true; } ArrayAddExpression(Path field, UpdateOperator op, List<RValueExpression> list); Path getField(); List<RValueExpression> getValues(); UpdateOperator getOp(); @Override JsonNode toJson(); static ArrayAddExpression fromJson(ObjectNode node); @Override int hashCode(); @Override boolean equals(Object obj);  }