Class ManifoldStreamCollectionsExt


  • public class ManifoldStreamCollectionsExt
    extends Object
    • Constructor Detail

      • ManifoldStreamCollectionsExt

        public ManifoldStreamCollectionsExt()
    • Method Detail

      • toList

        public static <T> List<T> toList​(Stream<T> thiz)
      • toSet

        public static <T> Set<T> toSet​(Stream<T> thiz)
        Returns:
        A set containing all the elements from the stream, retaining the order of the elements visited.
      • toMap

        public static <T,​K,​V> Map<K,​V> toMap​(Stream<T> thiz,
                                                               Function<? super T,​K> keyMapper,
                                                               Function<? super T,​V> valueMapper)
      • toMap

        public static <T,​K> Map<K,​T> toMap​(Stream<T> thiz,
                                                       Function<? super T,​K> keyMapper)
      • groupingBy

        public static <T,​V> Map<V,​List<T>> groupingBy​(Stream<T> thiz,
                                                                  Function<? super T,​V> valueMapper)