diff options
author | michelou <michelou@epfl.ch> | 2009-07-07 10:18:05 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2009-07-07 10:18:05 +0000 |
commit | dbe0e2bc384fdf7eac0312859347aa62a4778390 (patch) | |
tree | 36e9b3e88aa3c66f390306c082b827b741615116 /src/library/scala/collection/JavaConversions.scala | |
parent | 5754e85ed09df3722c3ca98e0832656ab8699e74 (diff) | |
download | scala-dbe0e2bc384fdf7eac0312859347aa62a4778390.tar.gz scala-dbe0e2bc384fdf7eac0312859347aa62a4778390.tar.bz2 scala-dbe0e2bc384fdf7eac0312859347aa62a4778390.zip |
fixed Scala comments, added svn:keywords
Diffstat (limited to 'src/library/scala/collection/JavaConversions.scala')
-rw-r--r-- | src/library/scala/collection/JavaConversions.scala | 69 |
1 files changed, 36 insertions, 33 deletions
diff --git a/src/library/scala/collection/JavaConversions.scala b/src/library/scala/collection/JavaConversions.scala index b118529f00..d1b4d7ffb7 100644 --- a/src/library/scala/collection/JavaConversions.scala +++ b/src/library/scala/collection/JavaConversions.scala @@ -10,41 +10,44 @@ package scala.collection -/** - * A collection of implicit conversions supporting interoperability between Scala and Java - * collections. - * <p> - * The following conversions are supported, - * <p> - * <ul> - * <li><code>scala.collection.Iterable</code> <=> <code>java.lang.Iterable</code></li> - * <li><code>scala.collection.Iterable</code> <=> <code>java.util.Collection</code></li> - * <li><code>scala.collection.Iterator</code> <=> <code>java.util.{ Iterator, Enumeration }</code></li> - * <li><code>scala.collection.mutable.Buffer</code> <=> <code>java.util.List</code></li> - * <li><code>scala.collection.mutable.Set</code> <=> <code>java.util.Set</code></li> - * <li><code>scala.collection.mutable.Map</code> <=> <code>java.util.Map</code></li> - * <ul> - * <p> - * In all cases, converting from a source type to a target type and back again will return - * the original source object, eg. - * <p> - * <pre> - * import scala.collections.jcl.Conversions._ +/** <p> + * A collection of implicit conversions supporting interoperability between + * Scala and Java collections. + * </p> + * <p> + * The following conversions are supported: + * </p> + * <ul> + * <li><code>scala.collection.Iterable</code> <=> <code>java.lang.Iterable</code></li> + * <li><code>scala.collection.Iterable</code> <=> <code>java.util.Collection</code></li> + * <li><code>scala.collection.Iterator</code> <=> <code>java.util.{ Iterator, Enumeration }</code></li> + * <li><code>scala.collection.mutable.Buffer</code> <=> <code>java.util.List</code></li> + * <li><code>scala.collection.mutable.Set</code> <=> <code>java.util.Set</code></li> + * <li><code>scala.collection.mutable.Map</code> <=> <code>java.util.Map</code></li> + * </ul> + * <p> + * In all cases, converting from a source type to a target type and back + * again will return the original source object, eg. + * </p> + * <pre> + * <b>import</b> scala.collections.jcl.Conversions._ * - * val sl = new scala.collection.mutable.ListBuffer[Int] - * val jl : java.util.List[Int] = sl - * val sl2 : scala.collection.mutable.Buffer[Int] = jl - * assert(sl eq sl2)g - * </pre> + * <b>val</b> sl = <b>new</b> scala.collection.mutable.ListBuffer[Int] + * <b>val</b> jl : java.util.List[Int] = sl + * <b>val</b> sl2 : scala.collection.mutable.Buffer[Int] = jl + * assert(sl eq sl2)g</pre> + * <p> + * Note that no conversion is provided from <code>scala.collection.immutable.List</code> + * to <code>java.util.List</code>. Instead it is convertible to an immutable + * <code>java.util.Collection</code> which provides size and interation + * capabilities, but not access by index as would be provided by + * <code>java.util.List</code>.<br/> + * This is intentional: in combination the implementation of + * <code>scala.collection.immutable.List</code> and the typical usage + * patterns of <code>java.util.List</code> would perform extremely poorly. + * </p> * - * <p> - * Note that no conversion is provided from scala.collection.immutable.List to java.util.List. - * Instead it is convertible to an immutable java.util.Collection which provides size and - * interation capabilities, but not access by index as would be provided by java.util.List. - * This is intentional: in combination the implementation of scala.collection.immutable.List - * and the typical usage patterns of java.util.List would perform extremely poorly. - * - * @author Miles Sabin + * @author Miles Sabin */ object JavaConversions { import java.{ lang => jl, util => ju } |