Added the values() function to the Map interface, as well as a new method,

forEach(), in which you pass a visitor function that will visit each key/value
stored in the map.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4257 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-07-11 18:22:29 +00:00
parent 489332edca
commit 78cefe9a8f
2 changed files with 43 additions and 6 deletions
+11
View File
@@ -21,6 +21,12 @@ public interface Map
*/
function get (key :Object) :*;
/**
* Call the specified function, which accepts to args: key and value,
* for every mapping.
*/
function forEach (fn :Function) :void;
/**
* Returns true if this map contains no elements.
*/
@@ -47,6 +53,11 @@ public interface Map
* Return the current size of the map.
*/
function size () :int;
/**
* Return all the values in this Map, in Array form.
*/
function values () :Array;
}
}