testdata for IDEA-118965

This commit is contained in:
Anna Kozlova
2014-03-06 10:15:24 +01:00
parent 46112ee3ec
commit e07fdee02a
2 changed files with 17 additions and 0 deletions
@@ -0,0 +1,13 @@
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
class IDEA118965 {
{
Stream<String> words = Arrays.asList("one", "one", "two").stream();
List<Map.Entry<String,Integer>> res = words.collect(Collectors.toMap(w -> w, w -> 1, (a, b) -> a + b))
.entrySet().stream().filter(e -> e.getValue() > 1).collect(Collectors.toList());
}
}