private class DirectoryHelper.DefaultLinkSorter extends Object implements Comparator<Pair<Boolean,DefaultLink>>
Modifier and Type | Field and Description |
---|---|
private List<String> |
_initialList |
private String[] |
_orderedLinksPrefLinksIdsArray |
Constructor and Description |
---|
DefaultLinkSorter(List<Pair<Boolean,DefaultLink>> initialList,
String[] orderedLinksPrefLinksIdsArray)
constructor for the helper
|
Modifier and Type | Method and Description |
---|---|
int |
compare(Pair<Boolean,DefaultLink> pair1,
Pair<Boolean,DefaultLink> pair2) |
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
private String[] _orderedLinksPrefLinksIdsArray
private List<String> _initialList
public DefaultLinkSorter(List<Pair<Boolean,DefaultLink>> initialList, String[] orderedLinksPrefLinksIdsArray)
initialList
- initial list to keep track of the original order if no order is foundorderedLinksPrefLinksIdsArray
- ordered list of link idspublic int compare(Pair<Boolean,DefaultLink> pair1, Pair<Boolean,DefaultLink> pair2)
compare
in interface Comparator<Pair<Boolean,DefaultLink>>