Class AbstractBNode

java.lang.Object
org.eclipse.rdf4j.model.base.AbstractBNode
All Implemented Interfaces:
Serializable, BNode, Resource, Value
Direct Known Subclasses:
SimpleBNode

public abstract class AbstractBNode extends Object implements BNode
Base class for BNode, offering common functionality.
Since:
3.5.0
Author:
Alessandro Bollini
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface Value

    Value.Type
    Modifier and Type
    Interface
    Description
    static enum 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Compares this blank node to another object.
    int
    Computes the hash code of this blank node.
    Returns the String-value of a Value object.
     

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface BNode

    getID, getType, isBNode
    Modifier and Type
    Method
    Description
    Retrieves this blank node's identifier.
    default Value.Type
     
    default boolean
    Check if the object is an instance of the given type.

    Methods inherited from interface Resource

    isResource
    Modifier and Type
    Method
    Description
    default boolean
    Check if the object is an instance of the given type.

    Methods inherited from interface Value

    isIRI, isLiteral, isTriple
    Modifier and Type
    Method
    Description
    default boolean
    Check if the object is an instance of the given type.
    default boolean
    Check if the object is an instance of the given type.
    default boolean
    Check if the object is an instance of the given type.
  • Constructor Details

    • AbstractBNode

      public AbstractBNode()
  • Method Details

    • stringValue

      public String stringValue()
      Description copied from interface: Value
      Returns the String-value of a Value object. This returns either a Literal's label, a IRI's URI or a BNode's ID.
      Specified by:
      stringValue in interface Value
    • equals

      public boolean equals(Object o)
      Description copied from interface: BNode
      Compares this blank node to another object.
      Specified by:
      equals in interface BNode
      Overrides:
      equals in class Object
      Parameters:
      o - the object to compare this blank node to
      Returns:
      true, if the other object is an instance of BNode and their IDs are equal; false, otherwise.
    • hashCode

      public int hashCode()
      Description copied from interface: BNode
      Computes the hash code of this blank node.
      Specified by:
      hashCode in interface BNode
      Overrides:
      hashCode in class Object
      Returns:
      a hash code for this blank node computed as BNode.getID().hashCode()
    • toString

      public String toString()
      Overrides:
      toString in class Object