Returns a new ordering on F which orders elements by first applying a function to them, then comparing those results using this. For example, to compare objects by their string forms, in a case-insensitive manner, use: {@code Ordering.from(String.CASE_INSENSITIVE_ORDER)
(Function<F, ? extends T> function)
| 423 | */ |
| 424 | |
| 425 | @GwtCompatible(serializable = true) |
| 426 | public <F> Ordering<F> onResultOf(Function<F, ? extends T> function) { |
| 427 | return new ByFunctionOrdering<F, T>(function, this); |
| 428 | } |
| 429 | |
| 430 | <T2 extends T> Ordering<Map.Entry<T2, ?>> onKeys() { |
| 431 | return onResultOf(Maps.<T2>keyFunction()); |
no outgoing calls
no test coverage detected