Skip to content

Commit e011d0a

Browse files
RubenVerborghelf-pavlik
authored andcommitted
Rigorously define equals for Quad.
1 parent e3a1a4c commit e011d0a

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

index.html

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,20 @@ <h3><dfn>Quad</dfn> interface</h3>
345345
<code>Triple</code> MUST be represented as <code>Quad</code> with <code>graph</code> set to a <code>DefaultGraph</code>
346346
</p>
347347
<p>
348-
<dfn>equals()</dfn> returns <code>true</code> if and only if the argument is a) of the same
349-
type b) has all components equal.
348+
<dfn>equals()</dfn> returns <code>true</code>
349+
when called with parameter <code>other</code>
350+
on an object <code>quad</code> if
351+
all of the conditions below hold:
352+
</p>
353+
<ul>
354+
<li><code>other</code> is <em>neither</em> <code>null</code> nor <code>undefined</code>;</li>
355+
<li><code>quad.subject.equals(other.subject)</code> evaluates to <code>true</code>;</li>
356+
<li><code>quad.predicate.equals(other.predicate)</code> evaluates to <code>true</code>;</li>
357+
<li><code>quad.object.equals(other.object)</code> evaluates to a <code>true</code>;</li>
358+
<li><code>quad.graph.equals(other.graph)</code> evaluates to a <code>true</code>;</li>
359+
</ul>
360+
<p>
361+
otherwise, it returns <code>false</code>.
350362
</p>
351363
</section>
352364

0 commit comments

Comments
 (0)