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 longserialVersionUID
-
Constructor Summary
Constructors Constructor Description LexicalValueComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(Value o1, Value o2)private intcompareBNodes(BNode leftBNode, BNode rightBNode)private intcompareDatatypes(IRI leftDatatype, IRI rightDatatype)Compares two literal datatypes and indicates if one should be ordered after the other.private intcompareDatatypes(XSD.Datatype leftDatatype, XSD.Datatype rightDatatype)private intcompareLiterals(Literal leftLit, Literal rightLit)private intcompareTriples(Triple leftTriple, Triple rightTriple)private intcompareURIs(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:
comparein 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)
-
-