void (List<MapInfo> infos) { List<MapInfo> items = new ArrayList<>(myModel.getItems()); for (MapInfo info : infos) { items.remove(info); items.add(MapInfo.registered(info.mapping, isMappingValid(info.mapping))); } sortAndAddSeparatorIfNeeded(items); myModel.setItems(items); }