- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for thenComparing (0.19 sec)
-
guava-tests/test/com/google/common/collect/ComparisonChainTest.java
.result(); Comparator<Foo> comparatorUsingComparatorMethods = comparing((Foo foo) -> foo.aString) .thenComparing(foo -> foo.anInt) .thenComparing(foo -> foo.anEnum, nullsLast(naturalOrder())); ImmutableList<Foo> instances = ImmutableList.of( new Foo("a", 1, TriState.TRUE), new Foo("a", 2, TriState.TRUE),
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Feb 12 03:05:13 UTC 2025 - 7.6K bytes - Viewed (0) -
guava/src/com/google/common/collect/ComparisonChain.java
* import static java.util.Comparator.naturalOrder; * * ... * private static final Comparator<Foo> COMPARATOR = * comparing((Foo foo) -> foo.aString) * .thenComparing(foo -> foo.anInt) * .thenComparing(foo -> foo.anEnum, nullsLast(naturalOrder())); * * @Override * public int compareTo(Foo that) { * return COMPARATOR.compare(this, that); * } * } *
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Mar 17 20:26:29 UTC 2025 - 11.1K bytes - Viewed (0)