Top "Scala-java-interop" questions

This pertains to calling Scala code from Java or vice-versa.

How do you call a Scala singleton method from Java?

I'm trying to inject some Scala code into my existing Java app. (So, being said, I want some more fun). …

java scala interop scala-java-interop
Scala Map to Java HashMap

I have a Scala function f(s1: String, s2: String): Map[String,String] I want to allow a colleague coding …

scala scala-collections scala-java-interop
Converting Java to Scala durations

Is there an elegant way to convert java.time.Duration to scala.concurrent.duration.FiniteDuration? I am trying to do …

scala config duration scala-java-interop
Using Scala traits with implemented methods in Java

I guess it is not possible to invoke methods implemented in Scala traits from Java, or is there a way? …

java scala scala-java-interop
How can I use a Java List with Scala's foreach?

I have tried to convert a java list to a Scala list without success using asInstanceOf, as my returned list …

java scala scala-java-interop
Convert a Java Future to a Scala Future

I have a Java Future object which I would like to convert into a Scala Future. Looking at the j.…

scala future scala-java-interop
Convert Scala Set into Java (java.util.Set)?

I have a Set in Scala (I can choose any implementation as I am creating the Set. The Java library …

scala type-conversion scala-collections scala-2.8 scala-java-interop
Please explain use of Option's orNull method

Scala's Option class has an orNull method, whose signature is shown below. orNull [A1 >: A](implicit ev : <:<[…

api scala scala-java-interop
How to use scala.None from Java code

Possible Duplicate: Accessing scala.None from Java In Java you can create an instance of Some using the constructor, i.…

java scala singleton scala-java-interop
Getting a Scala Map from a Java Properties

I was trying to pull environment variables into a scala script using java Iterators and / or Enumerations and realised that …

scala collections map scala-java-interop