Modifier and Type | Field and Description |
---|---|
static RefComparator |
INSTANCE
Singleton instance of RefComparator
|
Constructor and Description |
---|
RefComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(Ref o1,
Ref o2) |
static int |
compareTo(Ref o1,
Ref o2)
Compare two references by name.
|
static int |
compareTo(Ref o1,
java.lang.String o2)
Compare a reference to a name.
|
static java.util.Collection<Ref> |
sort(java.util.Collection<Ref> refs)
Sorts the collection of refs, returning a new collection.
|
public static final RefComparator INSTANCE
public int compare(Ref o1, Ref o2)
compare
in interface java.util.Comparator<Ref>
public static java.util.Collection<Ref> sort(java.util.Collection<Ref> refs)
refs
- collection to be sortedpublic static int compareTo(Ref o1, java.lang.String o2)
o1
- the reference instance.o2
- the name to compare to.