@Test public void testHashCodeIsTheSameForDifferentLabels() throws Exception { Link linkA = new Link(URI.create(URI_A), new String(LABEL_A)); Link linkB = new Link(URI.create(URI_A), new String(LABEL_B)); assertThat(linkA.hashCode(), equalTo(linkB.hashCode())); }
@Override public int hashCode() { return Objects.hash(getValue()); }
Link extends AbstractReifiedResource<URI> { @Override public int hashCode() { return Objects.hash(getValue()); } }
Link extends AbstractReifiedResource<URI> { @Override public int hashCode() { return Objects.hash(getValue()); } Link();  Link(URI resource);  Link(URI resource, String label); }
Link extends AbstractReifiedResource<URI> { @Override public int hashCode() { return Objects.hash(getValue()); } Link();  Link(URI resource);  Link(URI resource, String label); @Override int hashCode(); @Override boolean equals(final Object o); @OslcName("title") @OslcPropertyDefinition(OslcConstants.DCTERMS_NAMESPACE + "title") /** * Gets the link label. * * @return the label */ String getLabel(); void setLabel(String label); @Override String toString(); }
Link extends AbstractReifiedResource<URI> { @Override public int hashCode() { return Objects.hash(getValue()); } Link();  Link(URI resource);  Link(URI resource, String label); @Override int hashCode(); @Override boolean equals(final Object o); @OslcName("title") @OslcPropertyDefinition(OslcConstants.DCTERMS_NAMESPACE + "title") /** * Gets the link label. * * @return the label */ String getLabel(); void setLabel(String label); @Override String toString();  }