public final class NodeComparator extends Object
Nodes
.
The comparison can be used to sort Triples; equal triples are guaranteed to return 0,
however the implementation gives no promises about the exact order of Nodes.
Note: in order to be consistent with equals(), we use Node.equals(Object)
rather than
more suitable Node.sameValueAs(Object)
.Modifier and Type | Method and Description |
---|---|
static int |
compare(com.hp.hpl.jena.graph.Node n1,
com.hp.hpl.jena.graph.Node n2)
Compares two
Node instances. |
public static int compare(com.hp.hpl.jena.graph.Node n1, com.hp.hpl.jena.graph.Node n2)
Node
instances.
The comparison can be used to sort triples
, equal nodes
are guaranteed to return 0. No guarantees about the order of other nodes are given.n1
- the first object to be compared.n2
- the second object to be compared.Copyright © 2013. All Rights Reserved.