equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
233 * @throws NullPointerException if either argument is null. |
233 * @throws NullPointerException if either argument is null. |
234 * @see #comparing(Function, Comparator) |
234 * @see #comparing(Function, Comparator) |
235 * @see #thenComparing(Comparator) |
235 * @see #thenComparing(Comparator) |
236 * @since 1.8 |
236 * @since 1.8 |
237 */ |
237 */ |
238 default <U extends Comparable<? super U>> Comparator<T> thenComparing( |
238 default <U> Comparator<T> thenComparing( |
239 Function<? super T, ? extends U> keyExtractor, |
239 Function<? super T, ? extends U> keyExtractor, |
240 Comparator<? super U> keyComparator) |
240 Comparator<? super U> keyComparator) |
241 { |
241 { |
242 return thenComparing(comparing(keyExtractor, keyComparator)); |
242 return thenComparing(comparing(keyExtractor, keyComparator)); |
243 } |
243 } |