public class ReviewDbUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static <K extends com.google.gwtorm.client.IntKey<?>> |
intKeyOrdering()
Null-safe ordering over arbitrary subclass of
IntKey . |
static ReviewDb |
unwrapDb(ReviewDb db) |
public static <K extends com.google.gwtorm.client.IntKey<?>> com.google.common.collect.Ordering<K> intKeyOrdering()
IntKey
.
In some cases, Comparator.comparing(Change.Id::get)
may be shorter and cleaner.
However, this method may be preferable in some cases:
IntKey.get()
; comparing
is only a good idea if all inputs are obviously non-null.
intKeyOrdering().sortedCopy(iterable)
is shorter than the stream equivalent.
Ordering
method chaining
rather than static Comparator
methods.