private void createPathsNeighbours() { Set<Path> neighbours; for (Path path : this) { neighbours = new FastSet<Path>(); for (Road road : path) { for (EntityID entityID : road.getNeighbours()) { if (world.getEntity(entityID) instanceof Road) { for (Path p : this) { if (!path.equals(p) && p.contains((Road) world.getEntity(entityID))) { if (!neighbours.contains(p)) { neighbours.add(p); } } } } } } path.setNeighbours(neighbours); } }