Github user ajs6f commented on a diff in the pull request:
https://github.com/apache/incubator-commonsrdf/pull/26#discussion_r85336105
--- Diff: api/src/main/java/org/apache/commons/rdf/api/RDFTerm.java ---
@@ -37,4 +55,46 @@
*/
String ntriplesString();
+ /**
+ * Check it this RDFTerm is equal to another RDFTerm.
+ * <p>
+ * If this object is an {@link IRI}, equality is checked using
+ * {@link IRI#equals(Object)}, or if this object is a {@link BlankNode},
+ * equality is checked using {@link BlankNode#equals(Object)}, or if
this
+ * object is a {@link Literal}, equality is checked using
+ * {@link Literal#equals(Object)}.
+ * <p>
+ * Implementations MUST also override {@link #hashCode()} so that two
equal
+ * Literals produce the same hash code.
+ *
+ * @see IRI#equals(Object)
+ * @see BlankNode#equals(Object)
+ * @see Literal#equals(Object)
+ *
+ * @param other
+ * Another object
+ * @return true if other is a RDFTerm and is equal to this
+ */
+ @Override
+ public boolean equals(Object other);
+
+ /**
+ * Calculate a hash code for this RDFTerm.
+ * <p>
+ * As an {@link RDFTerm} is <em>immutable</em>, this method will always
+ * return the same hashCode over the lifetime of this object.
+ * <p>
+ * This method MUST be implemented in conjunction with
+ * {@link #equals(Object)} so that two equal RDFTerm produce the same
hash
--- End diff --
typo: `RDFTerms`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---