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

Method getOtherPlace

src/main/java/mudmap2/backend/Path.java:104–108  ·  view source on GitHub ↗

Gets the place that is not equal to p in a path @param p @return place of path that is not p @throws RuntimeException

(Place p)

Source from the content-addressed store, hash-verified

102 * @throws RuntimeException
103 */
104 public Place getOtherPlace(Place p) throws RuntimeException{
105 if(places[0] == p) return places[1];
106 else if(places[1] == p) return places[0];
107 else throw new RuntimeException("Place not found in path");
108 }
109
110 /**
111 * Removes this path from both places

Callers 6

testGetOtherPlaceMethod · 0.95
ContextMenuMethod · 0.80
paintMethod · 0.80
removePathMethod · 0.80
removePathsMethod · 0.80
breadthSearchMethod · 0.80

Calls

no outgoing calls

Tested by 1

testGetOtherPlaceMethod · 0.76