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

Method get

src/main/java/mudmap2/backend/Layer.java:238–244  ·  view source on GitHub ↗

Gets the element at a position @param x x coordinate @param y y coordinate @return element at that position or null

(final int x, final int y)

Source from the content-addressed store, hash-verified

236 * @return element at that position or null
237 */
238 public Place get(final int x, final int y) {
239 LayerElement layerElement = elements.get(x, y);
240 if(layerElement != null && layerElement instanceof Place) {
241 return (Place) layerElement;
242 }
243 return null;
244 }
245
246 /**
247 * Gets the surrounding places, without the center place

Callers 15

testSetPlaceholderMethod · 0.95
testPut_3argsMethod · 0.95
testPut_LayerElementMethod · 0.95
testGetMethod · 0.95
testRemoveMethod · 0.95
testReadWriteFileMethod · 0.95
testReadWriteFileMethod · 0.95
moveMethod · 0.95
updateInfobarMethod · 0.95
getSelectedPlaceMethod · 0.95
callCursorListenersMethod · 0.95

Calls 1

getMethod · 0.65

Tested by 7

testSetPlaceholderMethod · 0.76
testPut_3argsMethod · 0.76
testPut_LayerElementMethod · 0.76
testGetMethod · 0.76
testRemoveMethod · 0.76
testReadWriteFileMethod · 0.76
testReadWriteFileMethod · 0.76