@Test public void testEquals() { new EqualsTester() .addEqualityGroup(new Object()) .addEqualityGroup(OBJ, OBJ, new VarInt("a")) .addEqualityGroup(new VarInt("b")) .testEquals(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } VarInt other = (VarInt) obj; if (_var == null) { if (other._var != null) { return false; } } else if (!_var.equals(other._var)) { return false; } return true; }
VarInt extends IntExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } VarInt other = (VarInt) obj; if (_var == null) { if (other._var != null) { return false; } } else if (!_var.equals(other._var)) { return false; } return true; } }
VarInt extends IntExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } VarInt other = (VarInt) obj; if (_var == null) { if (other._var != null) { return false; } } else if (!_var.equals(other._var)) { return false; } return true; } @JsonCreator private  VarInt();  VarInt(String var); }
VarInt extends IntExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } VarInt other = (VarInt) obj; if (_var == null) { if (other._var != null) { return false; } } else if (!_var.equals(other._var)) { return false; } return true; } @JsonCreator private  VarInt();  VarInt(String var); @Override T accept(IntExprVisitor<T, U> visitor, U arg); @Override boolean equals(Object obj); @Override int evaluate(Environment environment); String getVar(); @Override int hashCode(); void setVar(String var); }
VarInt extends IntExpr { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } VarInt other = (VarInt) obj; if (_var == null) { if (other._var != null) { return false; } } else if (!_var.equals(other._var)) { return false; } return true; } @JsonCreator private  VarInt();  VarInt(String var); @Override T accept(IntExprVisitor<T, U> visitor, U arg); @Override boolean equals(Object obj); @Override int evaluate(Environment environment); String getVar(); @Override int hashCode(); void setVar(String var);  }