Class BambooCollectors


  • public final class BambooCollectors
    extends Object
    • Method Detail

      • toMap

        @NotNull
        public static <K,​V> @NotNull Collector<Map.Entry<K,​V>,​?,​Map<K,​V>> toMap()
      • toMap

        public static <K,​V> Collector<V,​?,​Map<K,​V>> toMap​(Function<V,​K> keyGenerator)
      • toMap

        public static <K,​V,​M extends Map<K,​V>> Collector<V,​?,​M> toMap​(Function<V,​K> keyGenerator,
                                                                                                    Supplier<M> mapSupplier)
      • toHashMap

        public static <K,​V> Collector<V,​?,​Map<K,​V>> toHashMap​(Function<V,​K> keyGenerator)
      • toLinkedHashMap

        public static <K,​V> Collector<V,​?,​Map<K,​V>> toLinkedHashMap​(Function<V,​K> keyGenerator)
      • throwingMerger

        public static <T> BinaryOperator<T> throwingMerger()
      • toMultimap

        public static <V,​K> Collector<V,​com.google.common.collect.Multimap<K,​V>,​com.google.common.collect.Multimap<K,​V>> toMultimap​(Function<V,​K> keyGenerator)
      • toMultimap

        @NotNull
        public static <V,​K,​M extends com.google.common.collect.Multimap<K,​V>> @NotNull Collector<V,​M,​M> toMultimap​(Function<V,​K> keyGenerator,
                                                                                                                                                 Supplier<M> multiMapSupplier)
      • toImmutableMap

        public static <E,​K,​V> Collector<E,​?,​Map<K,​V>> toImmutableMap​(Function<E,​K> keyTransformer,
                                                                                                   Function<E,​V> valueTransformer)
      • toListWithNullValueAsEmptyList

        public static <T> Collector<T,​List<T>,​List<T>> toListWithNullValueAsEmptyList()