Class StreamUtils

java.lang.Object
me.desht.pneumaticcraft.common.util.StreamUtils

public class StreamUtils extends Object
  • Constructor Details

    • StreamUtils

      public StreamUtils()
  • Method Details

    • ofType

      public static <T> Stream<T> ofType(Class<T> type, Stream<? super T> stream)
      Filter by the requested type and cast the remaining items.
      Parameters:
      type - the class to filter
      stream - the incoming stream
      Returns:
      a new filtered stream