public class PreOrderComparator extends Object implements Comparator<String>
A Comparator that sorts strings with '/' sorting before any
other character, to match the traditional LOCKSS URL traversal order.
| Modifier and Type | Field and Description |
|---|---|
static Comparator<String> |
INSTANCE |
| Constructor and Description |
|---|
PreOrderComparator() |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(String str1,
String str2) |
static int |
preOrderCompareTo(String str1,
String str2)
Comparison that matches the traversal order of CachedUrlSet iterators.
|
static int |
preOrderCompareToNullHigh(String str1,
String str2)
Comparison that matches the traversal order of CachedUrlSet iterators.
|
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 static final Comparator<String> INSTANCE
public int compare(String str1, String str2)
compare in interface Comparator<String>public static int preOrderCompareTo(String str1, String str2)
public static int preOrderCompareToNullHigh(String str1, String str2)
Copyright © 2000–2018 LOCKSS Program. All rights reserved.