/** * Attaches a parasite at a location, notifying listeners of the * {@link Listener#onAttached(Object, Collection) attachment} event. * * @param location * @param parasite */ public void attachParasite(L location, P parasite) { // Does key point to something that exists yet? I item = locationResolver.get(location); if (item != null) { put(attached, item, parasite); } else { put(unattached, location, parasite); } triggerOnAttached(item, parasite); }