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

public void addLayersToBeanContext ( List < Layer > layers ) { BeanContext bc = getBeanContext ( ) ; if ( bc == null || layers == null ) { return ; } for ( Layer layer : layers ) { if ( layer . getAddToBeanContext ( ) && layer . getBeanContext ( ) == null ) { bc . add ( 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 .
