Class StreamUtils

    • Constructor Detail

    • Method Detail

      • toStream

        public static <T> Stream<T> toStream​(Iterable<T> iterable)
        Returns a sequential Stream with the iterable as its source.
        Type Parameters:
        T - The element type to iterate over
        Parameters:
        iterable - The iterable
        Returns:
        The stream of for that iterable.
        Since:
        10718
      • reversedStream

        public static <T> Stream<T> reversedStream​(List<T> list)
        Creates a stream iterating the list in reversed order
        Type Parameters:
        T - the type of elements in the list
        Parameters:
        list - the list to iterate over
        Returns:
        a stream iterating the list in reversed order
        Since:
        15732
      • toHtmlList

        public static Collector<String,​?,​StringtoHtmlList()
        Creates a new Collector that collects the items and returns them as HTML unordered list.
        Returns:
        The collector.
        Since:
        10638