Class Collectors
- java.lang.Object
-
- jetbrains.buildServer.util.stream.Collectors
-
public final class Collectors extends Object
Implementations of
Collector
that implement various useful reduction operations.- Since:
- 2017.2
- Author:
- Andrey Shcheglov <mailto:andrey.shcheglov@jetbrains.com>
- See Also:
Collectors
-
-
Method Detail
-
toUnmodifiableList
@NotNull public static <T> Collector<T,List<T>,List<T>> toUnmodifiableList()
Returns a
Collector
that accumulates the input elements into a new unmodifiableList
. There are no guarantees on the type, serializability, or thread-safety of theList
returned; if more control over the returnedList
is required, useCollectors.toCollection(Supplier)
.- Type Parameters:
T
- the type of the input elements.- Returns:
- a
Collector
which collects all the input elements into an unmodifiableList
, in encounter order. - See Also:
Collectors.toList()
,Collections.unmodifiableList(List)
-
-