public PropertyEvent getLastEvent(Object obj, Property prop, Object arg) { if (!prop.isCollection()) { throw new IllegalArgumentException(); } List events = (List) m_collectionEvents.get(getKey(obj, prop)); if (events == null) { return null; } for (int i = events.size() - 1; i >= 0; i--) { PropertyEvent old = (PropertyEvent) events.get(i); if (old.getArgument().equals(arg)) { return old; } } return null; }
public PropertyEvent getLastEvent(PropertyEvent pe) { if (pe.getProperty().isCollection()) { return getLastEvent(pe.getObject(), pe.getProperty(), pe.getArgument()); } else { return getLastEvent(pe.getObject(), pe.getProperty()); } }