/** * Note a linked object to remove from a linker property's {@link Collection} value. * @param linkerToIdToLinked the map from linker property to linker ID to objects in {@link Collection}s * @param linker the linker object * @param linked the linked object */ private void addRemoval(Map<CP, SetMultimap<Long, Entry<String, Long>>> linkerToIdToLinked, CPI linker, CI linked) { if (model.isPropertyAccessible(linker.className, linker.propertyName)) { SetMultimap<Long, Entry<String, Long>> idMap = linkerToIdToLinked.get(linker.toCP()); if (idMap == null) { idMap = HashMultimap.create(); linkerToIdToLinked.put(linker.toCP(), idMap); } idMap.put(linker.id, Maps.immutableEntry(linked.className, linked.id)); } }