Package net.minecraftforge.fml.loading
Class Java9BackportUtils
- java.lang.Object
-
- net.minecraftforge.fml.loading.Java9BackportUtils
-
public class Java9BackportUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Java9BackportUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T,U,A,R>
java.util.stream.Collector<T,?,R>flatMapping(java.util.function.Function<? super T,? extends java.util.stream.Stream<? extends U>> mapper, java.util.stream.Collector<? super U,A,R> downstream)
static <T> void
ifPresentOrElse(java.util.Optional<T> optional, java.util.function.Consumer<? super T> action, java.lang.Runnable emptyAction)
static <T> java.util.stream.Stream<T>
toStream(java.util.Optional<T> optional)
-
-
-
Method Detail
-
flatMapping
public static <T,U,A,R> java.util.stream.Collector<T,?,R> flatMapping(java.util.function.Function<? super T,? extends java.util.stream.Stream<? extends U>> mapper, java.util.stream.Collector<? super U,A,R> downstream)
-
ifPresentOrElse
public static <T> void ifPresentOrElse(java.util.Optional<T> optional, java.util.function.Consumer<? super T> action, java.lang.Runnable emptyAction)
-
toStream
public static <T> java.util.stream.Stream<T> toStream(java.util.Optional<T> optional)
-
-