I want to use List.distinctBy to filter lists provided by (Javaslang) I added this dependency in my pom.xml
<dependency>
<groupId>io.vavr</groupId>
<artifactId>vavr-kotlin</artifactId>
<version>0.10.0</version>
but when I use it in the code
menuPriceByDayService
.findAllOrderByUpdateDate(menu, DateUtils.semestralDate(), 26)
.stream()
.distinctBy(MenuPriceByDay::getUpdateLocalDate)
.map(cp -> cp.getUpdateLocalDate())
.sorted()
.forEach(System.out::println);
I have a compilation error:
The method distinctBy(MenuPriceByDay::getUpdateLocalDate) is undefined for the type
Stream<MenuPriceByDay>