Package org.eclipse.rdf4j.model
Interface BNode
-
- All Known Implementing Classes:
AbstractBNode
,AbstractBNode.GenericBNode
,MemBNode
,SimpleBNode
public interface BNode extends Resource
An RDF-1.1 blank node (aka bnode, aka anonymous node). A blank node has an identifier to be able to compare it to other blank nodes internally. Please note that, conceptually, blank node equality can only be determined by examining the statements that refer to them.- See Also:
- RDF-1.1 Concepts and Abstract Syntax
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Compares this blank node to another object.java.lang.String
getID()
Retrieves this blank node's identifier.int
hashCode()
Computes the hash code of this blank node.default boolean
isBNode()
Check if the object is an instance of the given type.-
Methods inherited from interface org.eclipse.rdf4j.model.Resource
isResource
-
Methods inherited from interface org.eclipse.rdf4j.model.Value
isIRI, isLiteral, isTriple, stringValue
-
-
-
-
Method Detail
-
isBNode
default boolean isBNode()
Description copied from interface:Value
Check if the object is an instance of the given type. Typically 2x than using instanceof.For implementers: This default implementation is overridden in the repsective sub-interface.
-
getID
java.lang.String getID()
Retrieves this blank node's identifier.- Returns:
- A blank node identifier.
-
equals
boolean equals(java.lang.Object o)
Compares this blank node to another object.- Overrides:
equals
in classjava.lang.Object
- Parameters:
o
- the object to compare this blank node to- Returns:
true
, if the other object is an instance ofBNode
and their IDs are equal;false
, otherwise.
-
hashCode
int hashCode()
Computes the hash code of this blank node.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- a hash code for this blank node computed as
getID()
.hashCode()
-
-