public class

MoreCollectors

extends Object
java.lang.Object
   ↳ com.atlassian.bitbucket.util.MoreCollectors

Class Overview

Additional utility methods missing from java.util.stream.Collectors Collectors.

Summary

Public Methods
@Nonnull static <T> Collector<T, ?, List<T>> toImmutableList()
@Nonnull static <T, K, U> Collector<T, ?, Map<K, U>> toImmutableMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends U> valueMapper)
Returns a Collector that accumulates elements into an immutable map whose keys and values are the result of applying the provided mapping functions to the input elements.
@Nonnull static <T> Collector<T, ?, Set<T>> toImmutableSet()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

@Nonnull public static Collector<T, ?, List<T>> toImmutableList ()

@Nonnull public static Collector<T, ?, Map<K, U>> toImmutableMap (Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends U> valueMapper)

Returns a Collector that accumulates elements into an immutable map whose keys and values are the result of applying the provided mapping functions to the input elements.

@Nonnull public static Collector<T, ?, Set<T>> toImmutableSet ()