MCPcopy Create free account
hub / github.com/Neop/mudmap2 / addLayer

Method addLayer

src/main/java/mudmap2/backend/World.java:212–222  ·  view source on GitHub ↗

Adds or replaces a layer @param layer

(Layer layer)

Source from the content-addressed store, hash-verified

210 * @param layer
211 */
212 public void addLayer(Layer layer){ // TODO: throw Exception if layer exists
213 if(layer == null){
214 throw new NullPointerException();
215 }
216
217 if(!layers.containsKey(layer.getId()))
218 layers.put(layer.getId(), layer);
219
220 addChangeListener(layer);
221 callListeners(layer);
222 }
223
224 /**
225 * Deletes a layer and all places on it

Callers 9

testGetLayerMethod · 0.95
testAddLayerMethod · 0.95
testGetLayersMethod · 0.95
putPlaceholderMethod · 0.95
getNewLayerMethod · 0.95
readFileMethod · 0.95
setUpMethod · 0.80
setUpMethod · 0.80
setUpMethod · 0.80

Calls 4

addChangeListenerMethod · 0.95
callListenersMethod · 0.95
putMethod · 0.80
getIdMethod · 0.45

Tested by 6

testGetLayerMethod · 0.76
testAddLayerMethod · 0.76
testGetLayersMethod · 0.76
setUpMethod · 0.64
setUpMethod · 0.64
setUpMethod · 0.64