public void removeLayerFromCache ( LayerImpl layer ) { if ( layer . getId ( ) != layerId ) { throw new IllegalStateException ( ) ; } LayerCacheImpl layerCache = layerCacheRef . get ( ) ; if ( layerCache != null ) { layerCache . remove ( layer . getKey ( ) , layer ) ; } }
Convenience method to remove the layer that this class is associated with from the layer cache .