summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorSean McDirmid <sean.mcdirmid@gmail.com>2006-11-24 13:12:57 +0000
committerSean McDirmid <sean.mcdirmid@gmail.com>2006-11-24 13:12:57 +0000
commitf814b3162e06898c359cea623e3dd0f82df0d4ed (patch)
tree8bea30711930b1d3fb746dea09f62b977dbbc20b /src/library
parent5baf3e447f5c909591e75a8bb77968067f625420 (diff)
downloadscala-f814b3162e06898c359cea623e3dd0f82df0d4ed.tar.gz
scala-f814b3162e06898c359cea623e3dd0f82df0d4ed.tar.bz2
scala-f814b3162e06898c359cea623e3dd0f82df0d4ed.zip
Map.scala: added simple keySet method.
Trees.scala: added &~ operator to flags. Signatures.scala: trying to ignore synthetic flag in computed signatures. Infer.scala: fixed bug where dependency was being attributed to wrong unit.
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/collection/Map.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/library/scala/collection/Map.scala b/src/library/scala/collection/Map.scala
index 211158f047..ad3dc29380 100644
--- a/src/library/scala/collection/Map.scala
+++ b/src/library/scala/collection/Map.scala
@@ -76,6 +76,14 @@ trait Map[A, +B] extends AnyRef
case Some(_) => true
}
+ /** @return the keys of this map as a set.
+ */
+ def keySet = new Set[A] {
+ def size = Map.this.size;
+ def contains(key : A) = Map.this.contains(key);
+ def elements = Map.this.elements.map(._1);
+ }
+
/** Does this map contain a mapping from the given key to a value?
*
* @param key the key