Package alluxio.util

Class StreamUtils


  • public final class StreamUtils
    extends java.lang.Object
    Convenience methods for working with streams.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T,​R>
      java.util.List<R>
      map​(java.util.function.Function<T,​R> f, java.util.Collection<T> collection)  
      • Methods inherited from class java.lang.Object

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

      • map

        public static <T,​R> java.util.List<R> map​(java.util.function.Function<T,​R> f,
                                                        java.util.Collection<T> collection)
        Type Parameters:
        T - the input type
        R - the output type
        Parameters:
        f - the function to apply
        collection - a collection to map over
        Returns:
        a list containing the elements of the collection with the function applied