Class ImmutableCollectors
java.lang.Object
org.glassfish.jersey.internal.util.collection.ImmutableCollectors
Set of convenient function regarding a collection immutability. Particularly useful in the conjunction with
Stream.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates aCollectorof an immutable Set forStream.collect(Collector).Creates aCollectorof an immutable list forStream.collect(Collector).Creates aCollectorof an immutable Set forStream.collect(Collector).
-
Constructor Details
-
ImmutableCollectors
public ImmutableCollectors()
-
-
Method Details
-
toImmutableList
Creates aCollectorof an immutable list forStream.collect(Collector).- Type Parameters:
T- type of the immutable list.- Returns:
- collector for immutable list.
-
toImmutableSet
Creates aCollectorof an immutable Set forStream.collect(Collector).- Type Parameters:
T- type of the immutable set.- Returns:
- collector for immutable set.
-
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.
-