Package de.cronn.commons.lang
Class StreamUtil
java.lang.Object
de.cronn.commons.lang.StreamUtil
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiongroupingBy(Function<? super T, ? extends K> classifier) Drop-in replacement forCollectors.groupingBy(Function)which guarantees a deterministic order of the mapstatic <T> booleanhasDuplicates(Stream<T> entries) toLinkedHashMap(Function<? super T, ? extends K> keyMapper) toLinkedHashMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) static <T> Collector<T, ?, T> static <T> Collector<T, ?, T> toSingleElement(StreamUtil.ExceptionSupplier<T> exceptionSupplier) static <T> Collector<T, ?, T> toSingleElement(Supplier<RuntimeException> exceptionSupplier) toSingleOptionalElement(StreamUtil.ExceptionSupplier<T> exceptionSupplier)
-
Method Details
-
toLinkedHashSet
-
toModifiableList
-
groupingBy
public static <T,K> Collector<T,?, groupingByMap<K, List<T>>> (Function<? super T, ? extends K> classifier) Drop-in replacement forCollectors.groupingBy(Function)which guarantees a deterministic order of the map -
toLinkedHashMap
-
toLinkedHashMap
-
toSingleOptionalElement
-
toSingleOptionalElement
public static <T> Collector<T,?, toSingleOptionalElementOptional<T>> (StreamUtil.ExceptionSupplier<T> exceptionSupplier) -
toSingleElement
-
toSingleElement
-
toSingleElement
public static <T> Collector<T,?, toSingleElementT> (StreamUtil.ExceptionSupplier<T> exceptionSupplier) -
hasDuplicates
-