Для предикатов и функций имеет значение только тип возвращаемого значения, а не количество аргументов?
Код: Выделить всё
public static void main(String[] args) {
List strings = Arrays.asList("a", "b", "c", "d");
strings.stream()
.filter(s -> anotherTest())
.map(s -> anotherTransform())
.count();
}
public static boolean anotherTest() {
return true;
}
public static String anotherTransform() {
return "temp";
}
Подробнее здесь: https://stackoverflow.com/questions/785 ... -arguments
Мобильная версия