All Downloads are FREE. Search and download functionalities are using the official Maven repository.

akka.stream.javadsl.package.scala Maven / Gradle / Ivy

There is a newer version: 2.2.6.3
Show newest version
/**
 * Copyright (C) 2015-2017 Lightbend Inc. 
 */
package akka.stream

package object javadsl {
  def combinerToScala[M1, M2, M](f: akka.japi.function.Function2[M1, M2, M]): (M1, M2) ⇒ M =
    f match {
      case x if x eq Keep.left   ⇒ scaladsl.Keep.left.asInstanceOf[(M1, M2) ⇒ M]
      case x if x eq Keep.right  ⇒ scaladsl.Keep.right.asInstanceOf[(M1, M2) ⇒ M]
      case s: Function2[_, _, _] ⇒ s.asInstanceOf[(M1, M2) ⇒ M]
      case other                 ⇒ other.apply _
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy