返回值中的“&”字符的含义是什么?
public static <T, U extends Comparable<? super U>> Comparator<T> comparing(
Function<? super T, ? extends U> keyExtractor)
{
Objects.requireNonNull(keyExtractor);
return (Comparator<T> & Serializable)
(c1, c2) -> keyExtractor.apply(c1).compareTo(keyExtractor.apply(c2));
}
我感兴趣的部分是这样的:return (Comparator<T> & Serializable)
感谢您的帮助!