@Test public void testEquals() { UUID uuid = UUID.randomUUID(); new EqualsTester() .addEqualityGroup(new UuidBaseType(), new UuidBaseType(null, null)) .addEqualityGroup( new UuidBaseType(Atom.uuid(uuid)), new UuidBaseType(new Atom<>(Uuid.of(uuid))) ) .addEqualityGroup(new UuidBaseType("abc", null), new UuidBaseType("abc", null)) .addEqualityGroup(new UuidBaseType("abc", "strong"), new UuidBaseType("abc", "strong")) .testEquals(); }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof UuidBaseType)) { return false; } if (!super.equals(other)) { return false; } UuidBaseType that = (UuidBaseType) other; return Objects.equals(refTable, that.getRefTable()) && Objects.equals(refType, that.getRefType()); }
UuidBaseType extends BaseType { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof UuidBaseType)) { return false; } if (!super.equals(other)) { return false; } UuidBaseType that = (UuidBaseType) other; return Objects.equals(refTable, that.getRefTable()) && Objects.equals(refType, that.getRefType()); } }
UuidBaseType extends BaseType { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof UuidBaseType)) { return false; } if (!super.equals(other)) { return false; } UuidBaseType that = (UuidBaseType) other; return Objects.equals(refTable, that.getRefTable()) && Objects.equals(refType, that.getRefType()); } UuidBaseType();  UuidBaseType(Value enums);  UuidBaseType(String refTable, String refType); }
UuidBaseType extends BaseType { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof UuidBaseType)) { return false; } if (!super.equals(other)) { return false; } UuidBaseType that = (UuidBaseType) other; return Objects.equals(refTable, that.getRefTable()) && Objects.equals(refType, that.getRefType()); } UuidBaseType();  UuidBaseType(Value enums);  UuidBaseType(String refTable, String refType); String getRefTable(); String getRefType(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); }
UuidBaseType extends BaseType { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof UuidBaseType)) { return false; } if (!super.equals(other)) { return false; } UuidBaseType that = (UuidBaseType) other; return Objects.equals(refTable, that.getRefTable()) && Objects.equals(refType, that.getRefType()); } UuidBaseType();  UuidBaseType(Value enums);  UuidBaseType(String refTable, String refType); String getRefTable(); String getRefType(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }