Package org.intermine.util
Class NullFirstComparator
- java.lang.Object
-
- org.intermine.util.NullFirstComparator
-
- All Implemented Interfaces:
java.util.Comparator<java.lang.Object>
public final class NullFirstComparator extends java.lang.Object implements java.util.Comparator<java.lang.Object>
A Comparator that uses the natural ordering of elements implementing Comparable, plus null is allowed and always before all other elements. It also copes with Boolean values, placing them after null but before other values, TRUE before FALSE.- Author:
- Matthew Wakeling
-
-
Field Summary
Fields Modifier and Type Field Description static NullFirstComparator
SINGLETON
Publicly-accessible instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(java.lang.Object o1, java.lang.Object o2)
-
-
-
Field Detail
-
SINGLETON
public static final NullFirstComparator SINGLETON
Publicly-accessible instance
-
-