Class ImmutableCollectors
- java.lang.Object
-
- org.glassfish.jersey.internal.util.collection.ImmutableCollectors
-
-
Constructor Summary
Constructors Constructor Description ImmutableCollectors()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Collector<T,Set<T>,Set<T>>toImmutableLinkedSet()Creates aCollectorof an immutable Set forStream.collect(Collector).static <T> Collector<T,List<T>,List<T>>toImmutableList()Creates aCollectorof an immutable list forStream.collect(Collector).static <T> Collector<T,Set<T>,Set<T>>toImmutableSet()Creates aCollectorof an immutable Set forStream.collect(Collector).
-
-
-
Method Detail
-
toImmutableList
public static <T> Collector<T,List<T>,List<T>> toImmutableList()
Creates aCollectorof an immutable list forStream.collect(Collector).- Type Parameters:
T- type of the immutable list.- Returns:
- collector for immutable list.
-
toImmutableSet
public static <T> Collector<T,Set<T>,Set<T>> toImmutableSet()
Creates aCollectorof an immutable Set forStream.collect(Collector).- Type Parameters:
T- type of the immutable set.- Returns:
- collector for immutable set.
-
toImmutableLinkedSet
public static <T> Collector<T,Set<T>,Set<T>> toImmutableLinkedSet()
Creates aCollectorof an immutable Set forStream.collect(Collector).- Type Parameters:
T- type of the immutable linked hash set.- Returns:
- collector for immutable linked hash set.
-
-