Package org.eclipse.rdf4j.model.util
Class LexicalValueComparator
java.lang.Object
org.eclipse.rdf4j.model.util.LexicalValueComparator
- All Implemented Interfaces:
Serializable
,Comparator<Value>
A lexical RDF Term Comparator, this class does not compare numerically and is therefore a bit faster than a SPARQL
compliant comparator.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
private int
compareBNodes
(BNode leftBNode, BNode rightBNode) private int
compareDatatypes
(IRI leftDatatype, IRI rightDatatype) Compares two literal datatypes and indicates if one should be ordered after the other.private int
compareDatatypes
(XSD.Datatype leftDatatype, XSD.Datatype rightDatatype) private int
compareLiterals
(Literal leftLit, Literal rightLit) private int
compareTriples
(Triple leftTriple, Triple rightTriple) private int
compareURIs
(IRI leftURI, IRI rightURI) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
LexicalValueComparator
public LexicalValueComparator()
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<Value>
-
compareBNodes
-
compareURIs
-
compareLiterals
-
compareDatatypes
Compares two literal datatypes and indicates if one should be ordered after the other. This algorithm ensures that compatible ordered datatypes (numeric and date/time) are grouped together so thatinvalid reference
QueryEvaluationUtil#compareLiterals(Literal, Literal, CompareOp)
-
compareDatatypes
-
compareTriples
-