regards, Armin
Guillaume Nodet wrote:
Hi Armin
Here is simple class than can be included in PersistenceBrokerImpl as a replacement for the ArrayList. Just replacing the nowStoring and markedForDelete lists with this one. This seems to work fine
/** * List inheriting ArrayList, modified for checking objects on * object equality with '==' instead of 'equals' */ private static class IdentityArrayList extends ArrayList { public boolean contains(Object elem) { return indexOf(elem) >= 0; } public int indexOf(Object elem) { for (int i = 0; i < size(); i++) if (elem == get(i)) return i; return -1; } public int lastIndexOf(Object elem) { for (int i = size()-1; i >= 0; i--) if (elem == get(i)) return i; return -1; } }
Regards, Guillaume
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
