@Test public void testEquals() { final ViolationId other = new ViolationId(violationId.getNamespace(), violationId.getNamespacedIdentifier()); assertThat(other).isEqualTo(violationId); assertThat(violationId).isEqualTo(other); assertThat(violationId.hashCode()).isEqualTo(other.hashCode()); }
@Override public boolean equals(final Object obj) { if (this == obj) return true; if (!(obj instanceof ViolationId)) return false; return getIdentifier().equalsIgnoreCase(((ViolationId) obj).getIdentifier()); }
ViolationId { @Override public boolean equals(final Object obj) { if (this == obj) return true; if (!(obj instanceof ViolationId)) return false; return getIdentifier().equalsIgnoreCase(((ViolationId) obj).getIdentifier()); } }
ViolationId { @Override public boolean equals(final Object obj) { if (this == obj) return true; if (!(obj instanceof ViolationId)) return false; return getIdentifier().equalsIgnoreCase(((ViolationId) obj).getIdentifier()); } ViolationId(final String namespace, final String namespacedIdentifier); }
ViolationId { @Override public boolean equals(final Object obj) { if (this == obj) return true; if (!(obj instanceof ViolationId)) return false; return getIdentifier().equalsIgnoreCase(((ViolationId) obj).getIdentifier()); } ViolationId(final String namespace, final String namespacedIdentifier); @Override boolean equals(final Object obj); String getIdentifier(); String getNamespace(); String getNamespacedIdentifier(); @Override int hashCode(); @Override String toString(); }
ViolationId { @Override public boolean equals(final Object obj) { if (this == obj) return true; if (!(obj instanceof ViolationId)) return false; return getIdentifier().equalsIgnoreCase(((ViolationId) obj).getIdentifier()); } ViolationId(final String namespace, final String namespacedIdentifier); @Override boolean equals(final Object obj); String getIdentifier(); String getNamespace(); String getNamespacedIdentifier(); @Override int hashCode(); @Override String toString();  }