@Test public void testEquals() { new EqualsTester() .addEqualityGroup(new IntegerBaseType(), new IntegerBaseType(null, null)) .addEqualityGroup(new IntegerBaseType(2L, 4L), new IntegerBaseType(2L, 4L)) .addEqualityGroup( new IntegerBaseType(Atom.integer(42)), new IntegerBaseType(Atom.integer(42)) ) .addEqualityGroup(new IntegerBaseType(2L, null), new IntegerBaseType(2L, null)) .addEqualityGroup(new IntegerBaseType(null, 4L), new IntegerBaseType(null, 4L)) .testEquals(); }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof IntegerBaseType)) { return false; } if (!super.equals(other)) { return false; } IntegerBaseType that = (IntegerBaseType) other; return Objects.equals(minInteger, that.getMinInteger()) && Objects.equals(maxInteger, that.getMaxInteger()); }
IntegerBaseType extends BaseType { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof IntegerBaseType)) { return false; } if (!super.equals(other)) { return false; } IntegerBaseType that = (IntegerBaseType) other; return Objects.equals(minInteger, that.getMinInteger()) && Objects.equals(maxInteger, that.getMaxInteger()); } }
IntegerBaseType extends BaseType { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof IntegerBaseType)) { return false; } if (!super.equals(other)) { return false; } IntegerBaseType that = (IntegerBaseType) other; return Objects.equals(minInteger, that.getMinInteger()) && Objects.equals(maxInteger, that.getMaxInteger()); } IntegerBaseType();  IntegerBaseType(Value enums);  IntegerBaseType(Long minInteger, Long maxInteger); }
IntegerBaseType extends BaseType { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof IntegerBaseType)) { return false; } if (!super.equals(other)) { return false; } IntegerBaseType that = (IntegerBaseType) other; return Objects.equals(minInteger, that.getMinInteger()) && Objects.equals(maxInteger, that.getMaxInteger()); } IntegerBaseType();  IntegerBaseType(Value enums);  IntegerBaseType(Long minInteger, Long maxInteger); Long getMinInteger(); Long getMaxInteger(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); }
IntegerBaseType extends BaseType { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof IntegerBaseType)) { return false; } if (!super.equals(other)) { return false; } IntegerBaseType that = (IntegerBaseType) other; return Objects.equals(minInteger, that.getMinInteger()) && Objects.equals(maxInteger, that.getMaxInteger()); } IntegerBaseType();  IntegerBaseType(Value enums);  IntegerBaseType(Long minInteger, Long maxInteger); Long getMinInteger(); Long getMaxInteger(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }