Match recent changes on Java side.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4432 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -25,14 +25,24 @@ public class ObserverList
|
||||
|
||||
/**
|
||||
* Add an observer to this list.
|
||||
*
|
||||
* @param index the index at which to add the observer, or -1 for the end.
|
||||
*/
|
||||
public function add (observer :Object) :void
|
||||
public function add (observer :Object, index :int = -1) :void
|
||||
{
|
||||
if (!ArrayUtil.contains(_list, observer)) {
|
||||
_list.push(observer);
|
||||
_list.splice(index, 0, observer); // -1 to splice means "end"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the size of the list.
|
||||
*/
|
||||
public function size () :int
|
||||
{
|
||||
return _list.length;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an observer from this list.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user