Let's have Set implement forEach, like Map does.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5500 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -76,6 +76,13 @@ public class HashSet
|
||||
return (_hashMap.containsKey(o));
|
||||
}
|
||||
|
||||
public function forEach (fn :Function) :void
|
||||
{
|
||||
_hashMap.forEach(function (key :Object, val :Object) :void {
|
||||
fn(key);
|
||||
});
|
||||
}
|
||||
|
||||
public function size () :int
|
||||
{
|
||||
return (_hashMap.size());
|
||||
|
||||
Reference in New Issue
Block a user