Implicitly converts a Java List
to a Scala mutable Buffer
Implicitly converts a Scala Iterable
to an immutable Java
Collection
Implicitly converts a Scala Iterator
to a Java Enumeration
Implicitly converts a Java Collection
to an Scala Iterable
Implicitly converts a Java Iterable
to a Scala Iterable
Implicitly converts a Scala Iterable
to a Java Iterable
Implicitly converts a Java Enumeration
to a Scala Iterator
Implicitly converts a Java Iterator
to a Scala Iterator
Implicitly converts a Scala Iterator
to a Java Iterator
Implicitly converts a Scala mutable Buffer
to a Java List
Implicitly converts a Java Map
to a Scala mutable Map
Implicitly converts a Scala mutable Map
to a Java Map
Implicitly converts a Java Set
to a Scala mutable Set
Implicitly converts a Scala mutable Set
to a Java Set
A collection of implicit conversions supporting interoperability between Scala and Java collections.
The following conversions are supported:
scala.collection.Iterable
<=>java.lang.Iterable
scala.collection.Iterable
<=>java.util.Collection
scala.collection.Iterator
<=>java.util.{ Iterator, Enumeration }
scala.collection.mutable.Buffer
<=>java.util.List
scala.collection.mutable.Set
<=>java.util.Set
scala.collection.mutable.Map
<=>java.util.Map
In all cases, converting from a source type to a target type and back again will return the original source object, eg.
Note that no conversion is provided from
scala.collection.immutable.List
tojava.util.List
. Instead it is convertible to an immutablejava.util.Collection
which provides size and interation capabilities, but not access by index as would be provided byjava.util.List
.This is intentional: in combination the implementation of
scala.collection.immutable.List
and the typical usage patterns ofjava.util.List
would perform extremely poorly.