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

org.gfccollective.concurrent.JavaConverters.scala Maven / Gradle / Ivy

The newest version!
package org.gfccollective.concurrent

import java.util.concurrent.{ExecutorService => JExecutorService, ScheduledExecutorService => JScheduledExecutorService}

import org.gfccollective.concurrent.JavaConversions._

/**
 * Implicit conversions between scala functions and Java equivalents.
 */
object JavaConverters {

  implicit class ScalaExecutorServiceConverter[T](val jes: JExecutorService) extends AnyVal {
    @inline def asScala = asScalaExecutorService(jes)
  }

  implicit class ScalaScheduledExecutorServiceConverter[T](val jses: JScheduledExecutorService) extends AnyVal {
    @inline def asScala = asScalaAsyncScheduledExecutorService(jses)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy