Class ScalaFutureUtils


  • public class ScalaFutureUtils
    extends Object
    Utilities to convert Scala types into Java types.
    • Constructor Detail

      • ScalaFutureUtils

        public ScalaFutureUtils()
    • Method Detail

      • toJava

        public static <T,​U extends T> CompletableFuture<T> toJava​(scala.concurrent.Future<U> scalaFuture)
        Converts a Scala Future to a CompletableFuture.
        Type Parameters:
        T - type of the future value
        U - type of the original future
        Parameters:
        scalaFuture - to convert to a Java 8 CompletableFuture
        Returns:
        Java 8 CompletableFuture