Package org.eclipse.rdf4j.model.base
Class AbstractTriple
- java.lang.Object
-
- org.eclipse.rdf4j.model.base.AbstractTriple
-
- Direct Known Subclasses:
AbstractTriple.GenericTriple
,SimpleTriple
public abstract class AbstractTriple extends java.lang.Object implements Triple
Base class forTriple
, offering common functionality.- Since:
- 3.5.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
AbstractTriple.GenericTriple
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description AbstractTriple()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Compares this triple to another object.int
hashCode()
Computes the hash code of this triple.java.lang.String
stringValue()
Returns the String-value of a Value object.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.rdf4j.model.Resource
isResource
-
Methods inherited from interface org.eclipse.rdf4j.model.Triple
getObject, getPredicate, getSubject, isTriple
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
stringValue
public java.lang.String stringValue()
Description copied from interface:Value
Returns the String-value of a Value object. This returns either aLiteral
's label, aIRI
's URI or aBNode
's ID.- Specified by:
stringValue
in interfaceValue
-
equals
public boolean equals(java.lang.Object o)
Description copied from interface:Triple
Compares this triple to another object.- Specified by:
equals
in interfaceTriple
- Overrides:
equals
in classjava.lang.Object
- Parameters:
o
- the object to compare this triple to- Returns:
true
if theother
object is an instance ofTriple
and if their subjects, predicates and objects are equal;false
otherwise
-
hashCode
public int hashCode()
Description copied from interface:Triple
Computes the hash code of this triple.- Specified by:
hashCode
in interfaceTriple
- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- a hash code for this triple computed as
Objects.hash
(Triple.getSubject()
,Triple.getPredicate()
,Triple.getObject()
)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-