Say you have the following java bean:
public class MyBean { private List<String> names = new ArrayList<String>(); public void addName(String name) { names.add(name); fireNamesPropertyChange(name); } }
How would you normally implement a property change event for a collection? Do you try and use the index property which seems to be more for arrays than collections?
Take a look at Glazed Lists library, which has support for observable collections.
If I were to do it myself, I would likely create custom Listener interface with elementsAdded, elementsRemoved methods, or similar 🙂 (also depending on my needs)