@Test public void equals() { new EqualsTester() .addEqualityGroup(builder().build(), builder().build()) .addEqualityGroup(builder().id(ID).build()) .addEqualityGroup(builder().dataCenter(DATA_CENTER).build()) .addEqualityGroup(builder().rack(RACK).build()) .addEqualityGroup(builder().hostName(HOST_NAME).build()) .addEqualityGroup(builder().publicIpAddress(PUBLIC_IP_ADDRESS).build()) .testEquals(); }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } else if (obj == this) { return true; } else if (!getClass().isAssignableFrom(obj.getClass())) { return false; } return Arrays.equals(significantAttributes(), getClass().cast(obj).significantAttributes()); }
CassandraInstance { @Override public boolean equals(Object obj) { if (obj == null) { return false; } else if (obj == this) { return true; } else if (!getClass().isAssignableFrom(obj.getClass())) { return false; } return Arrays.equals(significantAttributes(), getClass().cast(obj).significantAttributes()); } }
CassandraInstance { @Override public boolean equals(Object obj) { if (obj == null) { return false; } else if (obj == this) { return true; } else if (!getClass().isAssignableFrom(obj.getClass())) { return false; } return Arrays.equals(significantAttributes(), getClass().cast(obj).significantAttributes()); } private  CassandraInstance(
      @JsonProperty("id") int id, @JsonProperty("datacenter") String dataCenter,
      @JsonProperty("rack") String rack, @JsonProperty("hostname") String hostName,
      @JsonProperty("publicIpAddress") String publicIpAddress,
      @JsonProperty("fullyQualifiedDomainName") String fullyQualifiedDomainName); private  CassandraInstance(Builder builder); }
CassandraInstance { @Override public boolean equals(Object obj) { if (obj == null) { return false; } else if (obj == this) { return true; } else if (!getClass().isAssignableFrom(obj.getClass())) { return false; } return Arrays.equals(significantAttributes(), getClass().cast(obj).significantAttributes()); } private  CassandraInstance(
      @JsonProperty("id") int id, @JsonProperty("datacenter") String dataCenter,
      @JsonProperty("rack") String rack, @JsonProperty("hostname") String hostName,
      @JsonProperty("publicIpAddress") String publicIpAddress,
      @JsonProperty("fullyQualifiedDomainName") String fullyQualifiedDomainName); private  CassandraInstance(Builder builder); @Min(1) int getId(); @NotEmpty String getDataCenter(); @NotEmpty String getRack(); @NotEmpty String getHostName(); @NotEmpty String getPublicIpAddress(); @Nullable String getFullyQualifiedDomainName(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
CassandraInstance { @Override public boolean equals(Object obj) { if (obj == null) { return false; } else if (obj == this) { return true; } else if (!getClass().isAssignableFrom(obj.getClass())) { return false; } return Arrays.equals(significantAttributes(), getClass().cast(obj).significantAttributes()); } private  CassandraInstance(
      @JsonProperty("id") int id, @JsonProperty("datacenter") String dataCenter,
      @JsonProperty("rack") String rack, @JsonProperty("hostname") String hostName,
      @JsonProperty("publicIpAddress") String publicIpAddress,
      @JsonProperty("fullyQualifiedDomainName") String fullyQualifiedDomainName); private  CassandraInstance(Builder builder); @Min(1) int getId(); @NotEmpty String getDataCenter(); @NotEmpty String getRack(); @NotEmpty String getHostName(); @NotEmpty String getPublicIpAddress(); @Nullable String getFullyQualifiedDomainName(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }