Rollback r5502.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5503 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2008-11-04 21:42:18 +00:00
parent b9245e9be8
commit 2a6940363d
6 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -63,10 +63,10 @@ public class ExpiringSet extends EventDispatcher
}
// from Set
public function forEach (fn :Function, thisObject :* = null) :void
public function forEach (fn :Function) :void
{
for each (var e :ExpiringElement in _data) {
fn.call(thisObject, e);
fn(e);
}
}
+3 -3
View File
@@ -263,11 +263,11 @@ public class HashMap
}
/** @inheritDoc */
public function forEach (fn :Function, thisObject :* = null) :void
public function forEach (fn :Function) :void
{
if (_simpleData != null) {
for (var key :Object in _simpleData) {
fn.call(thisObject, key, _simpleData[key]);
fn(key, _simpleData[key]);
}
}
@@ -275,7 +275,7 @@ public class HashMap
for (var ii :int = _entries.length - 1; ii >= 0; ii--) {
for (var e :Entry = (_entries[ii] as Entry); e != null;
e = e.next) {
fn.call(thisObject, e.getOriginalKey(), e.value);
fn(e.getOriginalKey(), e.value);
}
}
}
+2 -2
View File
@@ -76,10 +76,10 @@ public class HashSet
return (_hashMap.containsKey(o));
}
public function forEach (fn :Function, thisObject :* = null) :void
public function forEach (fn :Function) :void
{
_hashMap.forEach(function (key :Object, val :Object) :void {
fn.call(thisObject, key);
fn(key);
});
}
+1 -1
View File
@@ -46,7 +46,7 @@ public interface Map
* Call the specified function, which accepts two args: key and value,
* for every mapping.
*/
function forEach (fn :Function, thisObject :* = null) :void;
function forEach (fn :Function) :void;
/**
* Returns true if this map contains no elements.
+1 -1
View File
@@ -42,7 +42,7 @@ public interface Set
function contains (o :Object) :Boolean;
/** Call the specified function, which accepts an element as an argument. */
function forEach (fn :Function, thisObject :* = null) :void;
function forEach (fn :Function) :void;
/** Retuns the number of elements in this set. */
function size () :int; // @TSC - should this be uint?
+2 -2
View File
@@ -77,11 +77,11 @@ public class SortedHashMap extends HashMap
return vals;
}
override public function forEach (fn :Function, thisObject :* = null) :void
override public function forEach (fn :Function) :void
{
var keys :Array = keys();
for each (var key :Object in keys) {
fn.call(thisObject, key, get(key));
fn(key, get(key));
}
}