
com.carrotgarden.maven.scalor.util.Java8.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scalor-maven-plugin_2.12 Show documentation
Show all versions of scalor-maven-plugin_2.12 Show documentation
Build integrator for Java, Scala, Scala.macro, Scala.js, Scala.native, Eclipse and Maven
The newest version!
package com.carrotgarden.maven.scalor.util
import scala.language.implicitConversions
import java.util.function.{
Function ⇒ JFunction,
Supplier ⇒ JSupplier,
Predicate ⇒ JPredicate,
BiPredicate
}
object Java8 {
implicit def convert_ToJavaFunction[ A, B ]( f : Function1[ A, B ] ) = new JFunction[ A, B ] {
override def apply( a : A ) : B = f( a )
}
implicit def convert_ToJavaSupplier[ A ]( a : A ) = new JSupplier[ A ] {
override def get() : A = a
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy