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, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic 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 © 2017 SEMS project @ University of Rostock. All rights reserved.