mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-11 20:07:01 +07:00
Also remove .distinct() automatically when unnecessary. GitOrigin-RevId: 504dd9e645f9492a4142c0793c42188912afdde9
15 lines
355 B
Java
15 lines
355 B
Java
// "Fuse newHashSet into the Stream API chain" "true"
|
|
package com.google.common.collect;
|
|
|
|
import java.util.*;
|
|
import java.util.stream.*;
|
|
|
|
class X {
|
|
void foo(Stream<String> s) {
|
|
Set<String> set = Sets.newHashSet(s.co<caret>llect(Collectors.toSet()));
|
|
}
|
|
}
|
|
|
|
class Sets {
|
|
public static native <E> HashSet<E> newHashSet(Iterable<? extends E> var0);
|
|
} |