Constructor and Description |
---|
ImmutableCollectors() |
Modifier and Type | Method and Description |
---|---|
static <T> Collector<T,Set<T>,Set<T>> |
toImmutableLinkedSet()
Creates a
Collector of an immutable Set for Stream.collect(Collector) . |
static <T> Collector<T,List<T>,List<T>> |
toImmutableList()
Creates a
Collector of an immutable list for Stream.collect(Collector) . |
static <T> Collector<T,Set<T>,Set<T>> |
toImmutableSet()
Creates a
Collector of an immutable Set for Stream.collect(Collector) . |
public static <T> Collector<T,List<T>,List<T>> toImmutableList()
Collector
of an immutable list for Stream.collect(Collector)
.T
- type of the immutable list.public static <T> Collector<T,Set<T>,Set<T>> toImmutableSet()
Collector
of an immutable Set for Stream.collect(Collector)
.T
- type of the immutable set.public static <T> Collector<T,Set<T>,Set<T>> toImmutableLinkedSet()
Collector
of an immutable Set for Stream.collect(Collector)
.T
- type of the immutable linked hash set.Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.