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

Method getPathsTo

src/main/java/mudmap2/backend/Place.java:296–304  ·  view source on GitHub ↗

Get a set of paths connected to exit @param dir exit direction @return set of paths or empty set

(final String dir)

Source from the content-addressed store, hash-verified

294 * @return set of paths or empty set
295 */
296 public HashSet<Path> getPathsTo(final String dir) {
297 HashSet<Path> ret = new HashSet<>();
298 for (final Path pa : paths) {
299 if (pa.getExit(this).equals(dir)) {
300 ret.add(pa);
301 }
302 }
303 return ret;
304 }
305
306 /**
307 * Gets a flag value

Callers 5

testGetPathToMethod · 0.95
testReadWriteFileMethod · 0.95
testReadWriteFileMethod · 0.95
keyPressedMethod · 0.95
ContextMenuMethod · 0.80

Calls 1

getExitMethod · 0.45

Tested by 3

testGetPathToMethod · 0.76
testReadWriteFileMethod · 0.76
testReadWriteFileMethod · 0.76