Converts a javascalautils.Either to a scala.util.Either.
Converts a javascalautils.Either to a scala.util.Either.
import javascalautils.{ Either => JEither, Left => JLeft, Right => JRight } val eitherRight = asScalaEither(new JRight[String,String]("Left is not Right")) val eitherLeft = asScalaEither(new JLeft[String,String]("Left is not Right"))
The type to be converted
The converted type
1.0
Converts a javascalautils.Failure to a scala.util.Failure.
Converts a javascalautils.Failure to a scala.util.Failure.
import javascalautils.{Try => JTry, Success => JSuccess, Failure => JFailure} val failure = asScalaFailure(new JFailure(new Exception("Error, terror")))
The type to be converted
The converted type
1.0
Converts a javascalautils.concurrent.Future to a scala.concurrent.Future.
Converts a javascalautils.concurrent.Future to a scala.concurrent.Future.
import javascalautils.concurrent.{ Future => JFuture } //just illustrating a Java Future by creating an already fulfilled one val future = asScalaFuture(JFuture.successful("The Future is here"))
The type to be converted
The converted type
1.0
Converts a javascalautils.Left to a scala.util.Left.
Converts a javascalautils.Left to a scala.util.Left.
import javascalautils.{ Either => JEither, Left => JLeft, Right => JRight } val left = asScalaLeft(new JLeft[String,String]("Left is not Right"))
The type to be converted
The converted type
1.0
Converts a javascalautils.None to a scala.None.
Converts a javascalautils.None to a scala.None.
import javascalautils.{ None => JNone, Option => JOption, Some => JSome } val optionNone = asScalaOption(new JNone())
The type to be converted
The converted type
1.0
Converts a javascalautils.Option to a scala.Option.
Converts a javascalautils.Option to a scala.Option.
import javascalautils.{ None => JNone, Option => JOption, Some => JSome } val optionNone = asScalaOption(new JNone()) val optionSome = asScalaOption(new JSome("Some is never None"))
The type to be converted
The converted type
1.0
Converts a javascalautils.Right to a scala.util.Right.
Converts a javascalautils.Right to a scala.util.Right.
import javascalautils.{ Either => JEither, Left => JLeft, Right => JRight } val right = asScalaRight(new JRight[String,String]("Left is not Right"))
The type to be converted
The converted type
1.0
Converts a javascalautils.Some to a scala.Some.
Converts a javascalautils.Some to a scala.Some.
import javascalautils.{ None => JNone, Option => JOption, Some => JSome } val optionSome = asScalaOption(new JSome("Some is never None"))
The type to be converted
The converted type
1.0
Converts a javascalautils.Success to a scala.util.Success.
Converts a javascalautils.Success to a scala.util.Success.
import javascalautils.{Try => JTry, Success => JSuccess, Failure => JFailure} val success = asScalaSuccess(new JSuccess("Success is never a Failure"))
The type to be converted
The converted type
1.0
Converts a javascalautils.Try to a scala.util.Try.
Converts a javascalautils.Try to a scala.util.Try.
import javascalautils.{Try => JTry, Success => JSuccess, Failure => JFailure} val trySuccess = asScalaTry(new JSuccess("Success is never a Failure")) val tryFailure = asScalaTry(new JFailure(new Exception("Error, terror")))
The type to be converted
The converted type
1.0
Object implementing all converter traits.