SimpleLiteral implements Literal { @Override public int hashCode() { return label.hashCode(); } protected  SimpleLiteral(); protected  SimpleLiteral(String label); protected  SimpleLiteral(String label, String language); protected  SimpleLiteral(String label, IRI datatype); @Override String getLabel(); @Override Optional<String> getLanguage(); @Override IRI getDatatype(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override String stringValue(); @Override boolean booleanValue(); @Override byte byteValue(); @Override short shortValue(); @Override int intValue(); @Override long longValue(); @Override float floatValue(); @Override double doubleValue(); @Override BigInteger integerValue(); @Override BigDecimal decimalValue(); @Override XMLGregorianCalendar calendarValue();  }
@Test public final void testStringLiteralEqualsHashCode() { SimpleLiteral lit1 = new SimpleLiteral("a"); SimpleLiteral lit2 = new SimpleLiteral("a", XSD.STRING); assertEquals(lit1, lit2); assertEquals(lit1.hashCode(), lit2.hashCode()); }