Stream<Tuple2<T,U>>
을 javaslang 2.1.0-alpha로 Map<T,List<U>>
으로 변환하는 가장 관용적 인 방법은 무엇입니까?javaslang 투 플루 메이트 2 목록 트랜스 포메이션
// initial stream
Stream.of(
Tuple.of("foo", "x"),
Tuple.of("foo", "y"),
Tuple.of("bar", "x"),
Tuple.of("bar", "y"),
Tuple.of("bar", "z")
)
이 될해야합니다
이// end result
HashMap.ofEntries(
Tuple.of("foo", List.of("x","y")),
Tuple.of("bar", List.of("x","y","z"))
);
내가 API를 배우고의 창조자 해요, 그리고 배의 작업을 놓쳤다. 감사합니다 – Ghiro