scala-java-interop
What's the difference between == and .equals in Scala?
What is the difference between == and .equals() in Scala, and when to use which? Is the implementation same as in Java?[详细]
2023-04-11 13:15 分类:问答Using Scala traits with implemented methods in Java
I guess it is not po开发者_Go百科ssible to invoke methods implemented in Scala traits from Java, or is there a way?[详细]
2023-04-10 14:14 分类:问答java.util.Iterator to Scala list?
I have the following code: private lazy val keys: List[String] = obj.getKeys().asScala.toList obj.getKeys returns a java.util.Iterator<java.lang.String>[详细]
2023-04-08 05:33 分类:问答Scala convert List[Int] to a java.util.List[java.lang.Integer]
Is there a way in Scala to convert a List[Int] to java.util.List[java.lang.Integer]? I\'m interfacing with Java (Thrift).[详细]
2023-03-26 15:53 分类:问答How do I handle Hashtable nulls in Scala?
I\'m porting some java code across and have the following val overnightChanges: java.util.Hashtable[String, Double] = ...[详细]
2023-03-21 07:35 分类:问答How do I access Java enums from Scala?
My java class is as follows public class Test { protected enum TestEnum {A, B, C}; public Test(TestEnum te) {[详细]
2023-03-20 06:44 分类:问答Auto conversion between scala and java collections when using scala.collection.JavaConversions._ in scala 2.8
I have java API which return this type: ArrayList[ArrayList[String]] = Foo.someJavaMethod() In scala program, I need to send above type as a开发者_Go百科 parameter to a scala function \'bar\' whose[详细]
2023-03-19 01:32 分类:问答Using Java constants from Scala in Android
I have a strange problem with developing in Scala on Android. I\'m using sbt android plugin and right now I\'m trying to get content providers working, but...[详细]
2023-03-18 20:21 分类:问答Builder Library for Scala and Java
I need a builder library that can be called from Scala and Java. Easy enough in Scala using default, named parameters. But how do I call this code from Java? See below. Or perhaps I should go with a f[详细]
2023-03-12 10:36 分类:问答Create an immutable list from a java.lang.Iterator
I\'m using a library (JXPath) to query a graph of beans in order to extract matching elements. However, JXPath returns groups of matching elements as an instance of java.lang.Iterator and I\'drather l[详细]
2023-03-06 16:24 分类:问答