public void removeLayersFromBeanContext(List<Layer> layers){
  BeanContext bc=getBeanContext();
  if (bc == null || layers == null) {
    return;
  }
  for (  Layer layer : layers) {
    bc.remove(layer);
  }
}

public void removeLayersFromBeanContext ( List < Layer > layers ) { BeanContext bc = getBeanContext ( ) ; if ( bc == null || layers == null ) { return ; } for ( Layer layer : layers ) { bc . remove ( layer ) ; } }
add layers to the beancontext , if they want to be . since the beancontext is a collection , it doesn ' t matter if a layer is already there because duplicates aren ' t allowed .
