Hi,
I need to implement List decorator class, which notify registered listeners in case of any change in list. I have subclassed AbstractListDecorator
from org.apache.commons.collections15 and override methods like add()
, addAll()
, remove(int)
, remove(E)
and so on with my notifying.
But there are some holes in -- for example when iterating through List by default AbstractListDecorator.iterator()
and call Iterator.remove()
method, either overridden methods remove(int)
or remove(E)
doesn't call.
Is there any standard and safety practice for decorating such things?
Thank you.