scala.collection

# convert

#### package convert

Source
  package.scala

Linear Supertypes
AnyRef, Any
Content Hierarchy Learn more about scaladoc diagrams
Ordering

1. Alphabetic
2. By inheritance

Inherited

1. convert
2. AnyRef
3. Any

1. Hide All
2. Show all

Visibility

1. Public
2. All

### Type Members

1. #### trait DecorateAsJava extends AnyRef

   A collection of decorators that allow to convert between Scala and Java collections using `asScala` and `asJava` methods.

   A collection of decorators that allow to convert between Scala and Java collections using `asScala` and `asJava` methods.

   The following conversions are supported via `asJava`, `asScala`

   - `scala.collection.Iterable` <=> `java.lang.Iterable`
   - `scala.collection.Iterator` <=> `java.util.Iterator`
   - `scala.collection.mutable.Buffer` <=> `java.util.List`
   - `scala.collection.mutable.Set` <=> `java.util.Set`
   - `scala.collection.mutable.Map` <=> `java.util.Map`
   - `scala.collection.mutable.concurrent.Map` <=> `java.util.concurrent.ConcurrentMap`

   In all cases, converting from a source type to a target type and back again will return the original source object, e.g.

       import scala.collection.JavaConverters._

       val sl = new scala.collection.mutable.ListBuffer[Int]
       val jl : java.util.List[Int] = sl.asJava
       val sl2 : scala.collection.mutable.Buffer[Int] = jl.asScala
       assert(sl eq sl2)

   The following conversions also are supported, but the direction Scala to Java is done my a more specifically named method: `asJavaCollection`, `asJavaEnumeration`, `asJavaDictionary`.

   - `scala.collection.Iterable` <=> `java.util.Collection`
   - `scala.collection.Iterator` <=> `java.util.Enumeration`
   - `scala.collection.mutable.Map` <=> `java.util.Dictionary`

   In addition, the following one way conversions are provided via `asJava`:

   - `scala.collection.Seq` => `java.util.List`
   - `scala.collection.mutable.Seq` => `java.util.List`
   - `scala.collection.Set` => `java.util.Set`
   - `scala.collection.Map` => `java.util.Map`
   Since

     2.8.1

2. #### trait DecorateAsScala extends AnyRef

3. #### trait WrapAsJava extends AnyRef

4. #### trait WrapAsScala extends AnyRef

### Value Members

1. #### object WrapAsJava extends WrapAsJava

2. #### object WrapAsScala extends WrapAsScala

3. #### object Wrappers extends Wrappers with Serializable

   Annotations
     @SerialVersionUID()

4. #### val decorateAll: DecorateAsJava with DecorateAsScala

5. #### val decorateAsJava: DecorateAsJava

6. #### val decorateAsScala: DecorateAsScala

7. #### val wrapAll: WrapAsJava with WrapAsScala

8. #### val wrapAsJava: WrapAsJava

9. #### val wrapAsScala: WrapAsScala

### Inherited from AnyRef

### Inherited from Any

### Ungrouped