Package org.eclipse.rdf4j.model.util
Class LexicalValueComparator
- java.lang.Object
-
- org.eclipse.rdf4j.model.util.LexicalValueComparator
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.Comparator<Value>
public class LexicalValueComparator extends java.lang.Object implements java.io.Serializable, java.util.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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description LexicalValueComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Value o1, Value o2)
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)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
compare
public int compare(Value o1, Value o2)
- Specified by:
compare
in interfacejava.util.Comparator<Value>
-
compareDatatypes
private int compareDatatypes(IRI leftDatatype, IRI rightDatatype)
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 thatQueryEvaluationUtil#compareLiterals(Literal, Literal, CompareOp)
is used in consecutive ordering steps.
-
compareDatatypes
private int compareDatatypes(XSD.Datatype leftDatatype, XSD.Datatype rightDatatype)
-
-