/** * Detaches a parasite from a location, notifying listeners of the * {@link Listener#onDetached(Object, Collection) detachment} event. * * @param location * @param parasite */ public void detachParasite(L location, P parasite) { I item = locationResolver.get(location); if (item != null) { remove(attached, item, parasite); } else { remove(unattached, location, parasite); } triggerOnDetached(item, parasite); }