Github user stain commented on the issue:
https://github.com/apache/incubator-commonsrdf/pull/19
@afs I've updated the quad javadocs to clarify my view:
http://stain.github.io/incubator-commonsrdf/quad/org/apache/commons/rdf/api/Quad.html#equals-java.lang.Object-
says:
> Two Quads are equal if and only if their getGraphName(), getSubject(),
getPredicate() and getObject() are equal.
> Implementations MUST also override hashCode() so that two equal Quads
produce the same hash code.
> Note that a Quad MUST NOT be equal to a Triple, even if this Quad's
getGraphName() is Optional.empty(). To test triple-like equivalence, callers
can use:
```java
Quad q1;
Triple t2;
q1.asTriple().equals(t2));
```
The last statement means that `Triple` don't need to support the inverse
`.equals(Quad)` and if someone really wanted to do `Quad extends Triple` then
they would need to have a boolean isQuad; or similar to know which semantics to
use in its `.equals()` (just as if they wanted to implement both Literal and
IRI).
---
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.
---