diff options
author | Paul Phillips <paulp@improving.org> | 2009-11-06 19:25:10 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-11-06 19:25:10 +0000 |
commit | f540f0350315c2af8779286f85084405cdbf0d76 (patch) | |
tree | 3b778ca201f97c6c105205fcf01dceb9429793f8 /src/compiler | |
parent | 5d25e9334d6dfd492cb5312a43b3d3f36042401a (diff) | |
download | scala-f540f0350315c2af8779286f85084405cdbf0d76.tar.gz scala-f540f0350315c2af8779286f85084405cdbf0d76.tar.bz2 scala-f540f0350315c2af8779286f85084405cdbf0d76.zip |
- Renames filterMap to partialMap
- Renames GenericRange to NumericRange
- Removes most @experimental annotations
Diffstat (limited to 'src/compiler')
4 files changed, 5 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/nsc/io/AbstractFile.scala b/src/compiler/scala/tools/nsc/io/AbstractFile.scala index 51bfb741cb..9e40feeca9 100644 --- a/src/compiler/scala/tools/nsc/io/AbstractFile.scala +++ b/src/compiler/scala/tools/nsc/io/AbstractFile.scala @@ -58,7 +58,7 @@ object AbstractFile * @return ... */ def getURL(url: URL): AbstractFile = - Option(url) filterMap { case url: URL if isJarOrZip(url.getPath) => ZipArchive fromURL url } orNull + Option(url) partialMap { case url: URL if isJarOrZip(url.getPath) => ZipArchive fromURL url } orNull } /** diff --git a/src/compiler/scala/tools/nsc/io/Directory.scala b/src/compiler/scala/tools/nsc/io/Directory.scala index 139e433383..3a01277fef 100644 --- a/src/compiler/scala/tools/nsc/io/Directory.scala +++ b/src/compiler/scala/tools/nsc/io/Directory.scala @@ -44,8 +44,8 @@ class Directory(jfile: JFile) extends Path(jfile) case xs => xs.iterator map Path.apply } - def dirs: Iterator[Directory] = list filterMap { case x: Directory => x } - def files: Iterator[File] = list filterMap { case x: File => x } + def dirs: Iterator[Directory] = list partialMap { case x: Directory => x } + def files: Iterator[File] = list partialMap { case x: File => x } /** If optional depth argument is not given, will recurse * until it runs out of contents. @@ -59,7 +59,7 @@ class Directory(jfile: JFile) extends Path(jfile) * to the (optionally) given depth. */ def subdirs(depth: Int = 1): Iterator[Directory] = - deepList(depth) filterMap { case x: Directory => x } + deepList(depth) partialMap { case x: Directory => x } /** Deletes the directory recursively. Returns false on failure. * Use with caution! diff --git a/src/compiler/scala/tools/nsc/io/Process.scala b/src/compiler/scala/tools/nsc/io/Process.scala index e6626e0abe..5b22028741 100644 --- a/src/compiler/scala/tools/nsc/io/Process.scala +++ b/src/compiler/scala/tools/nsc/io/Process.scala @@ -33,13 +33,11 @@ import java.util.concurrent.LinkedBlockingQueue * @since 2.8 */ -@experimental object Process { lazy val javaVmArguments = java.lang.management.ManagementFactory.getRuntimeMXBean().getInputArguments() lazy val runtime = Runtime.getRuntime() - @experimental private[Process] class ProcessBuilder(val pb: JProcessBuilder) { def this(cmd: String*) = this(new JProcessBuilder(cmd: _*)) @@ -105,7 +103,6 @@ object Process } import Process._ -@experimental class Process(processCreator: () => JProcess) extends Iterable[String] { lazy val process = processCreator() diff --git a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala index ba7eac7ea0..4bc8826908 100644 --- a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala +++ b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala @@ -150,7 +150,7 @@ trait ParallelMatching extends ast.TreeDSL if (!scrut.isSimple) None else { val (_lits, others) = ps span isSwitchableConst - val lits = _lits filterMap { case x: LiteralPattern => x } + val lits = _lits partialMap { case x: LiteralPattern => x } condOpt(others) { case Nil => new PatternSwitch(scrut, lits, None) |