void (Map<RadComponent, RadComponent> duplicates, final RadComponent c, final RadComponent copy) { duplicates.put(c, copy); if (c instanceof RadContainer container) { LOG.assertTrue(copy instanceof RadContainer); final RadContainer containerCopy = (RadContainer)copy; for(int i=0; i<container.getComponentCount(); i++) { fillDuplicateMap(duplicates, container.getComponent(i), containerCopy.getComponent(i)); } } }