summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/Iterator.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-09-23 14:13:55 +0000
committerPaul Phillips <paulp@improving.org>2009-09-23 14:13:55 +0000
commit0d86d977a3eb153f46c59f348638426b821e006c (patch)
treee3f063a2fb6e5d0b6e122e1e8178175e433ccc75 /src/library/scala/collection/Iterator.scala
parentdc65ebea9e2e5953a23a11c4df87d0fd7c81f19b (diff)
downloadscala-0d86d977a3eb153f46c59f348638426b821e006c.tar.gz
scala-0d86d977a3eb153f46c59f348638426b821e006c.tar.bz2
scala-0d86d977a3eb153f46c59f348638426b821e006c.zip
Some more XML reworking.
Diffstat (limited to 'src/library/scala/collection/Iterator.scala')
-rw-r--r--src/library/scala/collection/Iterator.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/library/scala/collection/Iterator.scala b/src/library/scala/collection/Iterator.scala
index bbb6d3d690..d3bab1aff2 100644
--- a/src/library/scala/collection/Iterator.scala
+++ b/src/library/scala/collection/Iterator.scala
@@ -366,6 +366,15 @@ trait Iterator[+A] { self =>
}
}
+ /** Returns an iterator over all the elements of this iterator which
+ * do not satisfy the predicate <code>p</code>.
+ *
+ * @param p the predicate used to filter.
+ * @return the elements of this iterator not satisfying <code>p</code>.
+ */
+
+ def filterNot(p: A => Boolean): Iterator[A] = filter(!p(_))
+
/** Returns a new iterator based on the partial function <code>pf</code>,
* containing <code>pf(x)</code> for all the elements which are defined on pf.
* The order of the elements is preserved.