01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2006.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.model;
07:
08: /**
09: * A blank node (aka <em>bnode</em>, aka <em>anonymous node</em>). A blank node
10: * has an identifier to be able to compare it to other blank nodes internally.
11: * Please note that, conceptually, blank node equality can only be determined by
12: * examining the statements that refer to them.
13: */
14: public interface BNode extends Resource {
15:
16: /**
17: * retrieves this blank node's identifier.
18: *
19: * @return A blank node identifier.
20: */
21: public String getID();
22:
23: /**
24: * Compares a blank node object to another object.
25: *
26: * @param o The object to compare this blank node to.
27: * @return <tt>true</tt> if the other object is an instance of {@link BNode}
28: * and their IDs are equal, <tt>false</tt> otherwise.
29: */
30: public boolean equals(Object o);
31:
32: /**
33: * The hash code of a blank node is defined as the hash code of its
34: * identifier: <tt>id.hashCode()</tt>.
35: *
36: * @return A hash code for the blank node.
37: */
38: public int hashCode();
39: }
|