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
I\'m just beginning in scala and I\'m converting some java code into scala and trying to make it nice and functionally elegant.
I\'m just updating some of my code to 2.9.0, and I\'ve run into a problem. I have a trait that I call \"NonStrictIterable\" (essentially, everything should be as lazy as possible --- no code outside N
If I have this: val a = Array(\"a \",\"b \",\"c \") val b = Array(\"x\",\"y\") I 开发者_运维知识库would like to know if such a method exists which would let me traverse the first collection, and fo
The following doesn\'t compile. Do I need to cast the person first? object People { def all = List( new Person(\"Jack\", 33),
I can\'t figure out how to deal with overriding \"+\" in an immutable map if the map can only store an invariant type for its values.
class DefaultListMap[A, B <: List[B]] extends HashMap[A, B] { override def default(key: A) = List[B]()
I have an array of strings. What\'s the best way to turn it into an immutable set of strings? I presume this is a single method call, but I can\'t find it in the scala docs.
Scala\'s collection library contains the forwarders IterableForwarder, TraversableForwarder, SeqForwarder and proxies like IterableProxy, MapProxy, SeqProxy, SetProxy, TraversableProxy, etc. Forwarder
In the Scala Collections framework, I think there are some behaviors that are counterintuitive when using map().