Remove by reference as well.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@1892 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
ray
2006-08-25 01:28:13 +00:00
parent 3351e80335
commit 308f771857
@@ -196,6 +196,17 @@ public class ObserverList<T> extends ArrayList<T>
return -1;
}
@Override
public boolean remove (Object element)
{
int dex = indexOf(element);
if (dex == -1) {
return false; // not found
}
remove(dex);
return true;
}
/**
* Applies the supplied observer operation to all observers in the
* list in a manner conforming to the notification ordering policy