public class GuavaCollectors extends Object
Modifier and Type | Method and Description |
---|---|
static <T> java.util.stream.Collector<T,ImmutableList.Builder<T>,ImmutableList<T>> |
toImmutableList()
Collect the values from a stream to an
ImmutableList . |
static <T> java.util.stream.Collector<T,ImmutableSet.Builder<T>,ImmutableSet<T>> |
toImmutableSet()
Collect the values from a stream to an
ImmutableSet . |
public static <T> java.util.stream.Collector<T,ImmutableList.Builder<T>,ImmutableList<T>> toImmutableList()
ImmutableList
.T
- The type of elements contained by the listpublic static <T> java.util.stream.Collector<T,ImmutableSet.Builder<T>,ImmutableSet<T>> toImmutableSet()
ImmutableSet
.T
- The type of elements contained in the set