Class StreamUtil


  • public class StreamUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      StreamUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.util.function.Predicate<T> distinctByKey​(java.util.function.Function<? super T,​?> keyExtractor)  
      static <T,​K,​U>
      java.util.stream.Collector<T,​?,​java.util.LinkedHashMap<K,​U>>
      toLinkedHashMap​(java.util.function.Function<? super T,​? extends K> keyMapper, java.util.function.Function<? super T,​? extends U> valueMapper)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StreamUtil

        public StreamUtil()
    • Method Detail

      • toLinkedHashMap

        public static <T,​K,​U> java.util.stream.Collector<T,​?,​java.util.LinkedHashMap<K,​U>> toLinkedHashMap​(java.util.function.Function<? super T,​? extends K> keyMapper,
                                                                                                                                         java.util.function.Function<? super T,​? extends U> valueMapper)
      • distinctByKey

        public static <T> java.util.function.Predicate<T> distinctByKey​(java.util.function.Function<? super T,​?> keyExtractor)