private void removeObsoleteElements(List<String> names,Map<String,View> sharedElements,List<String> elementsToRemove){
  if (elementsToRemove.size() > 0) {
    names.removeAll(elementsToRemove);
    for (    String elementToRemove : elementsToRemove) {
      sharedElements.remove(elementToRemove);
    }
  }
}

private void removeObsoleteElements ( List < String > names , Map < String , View > sharedElements , List < String > elementsToRemove ) { if ( elementsToRemove . size ( ) > 0 ) { names . removeAll ( elementsToRemove ) ; for ( String elementToRemove : elementsToRemove ) { sharedElements . remove ( elementToRemove ) ; } } }
removes obsolete elements from names and shared elements .
