Class Helpers.NullsBefore
java.lang.Object
com.google.common.collect.testing.Helpers.NullsBefore
- All Implemented Interfaces:
Serializable
,Comparator<@Nullable String>
- Direct Known Subclasses:
Helpers.NullsBeforeB
,Helpers.NullsBeforeTwo
- Enclosing class:
Helpers
public abstract static class Helpers.NullsBefore
extends Object
implements Comparator<@Nullable String>, Serializable
Compares strings in natural order except that null comes immediately before a given value. This
works better than Ordering.natural().nullsFirst() because, if null comes before all other
values, it lies outside the submap/submultiset ranges we test, and the variety of tests that
exercise null handling fail on those subcollections.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
NullsBefore
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<@Nullable String>
-
equals
-
hashCode
-