public class NodeDistanceComparator extends Object implements Comparator<NodeDistance>
Constructor and Description |
---|
NodeDistanceComparator()
Instantiates a new node distance comparator sorting the distances
ascending.
|
NodeDistanceComparator(boolean reverse)
Instantiates a new node distance comparator.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(NodeDistance o1,
NodeDistance o2) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public NodeDistanceComparator()
public NodeDistanceComparator(boolean reverse)
true
subtrees are sorted in descending order, otherwise
ascending.reverse
- the reversepublic int compare(NodeDistance o1, NodeDistance o2)
compare
in interface Comparator<NodeDistance>
Copyright © 2019 SEMS project @ University of Rostock. All rights reserved.