Removes all connections to other places (paths, child-connections)
()
| 403 | * Removes all connections to other places (paths, child-connections) |
| 404 | */ |
| 405 | public void removeConnections() { |
| 406 | // remove place paths (buffer, since connected_places will be modified) |
| 407 | final HashSet<Path> cp_buffer = (HashSet<Path>) paths.clone(); |
| 408 | for (final Path p : cp_buffer) { |
| 409 | p.remove(); |
| 410 | } |
| 411 | // remove place connection to children / parents |
| 412 | for (final Place pl : children) { |
| 413 | pl.parents.remove(this); |
| 414 | } |
| 415 | children.clear(); |
| 416 | for (final Place pl : parents) { |
| 417 | pl.children.remove(this); |
| 418 | } |
| 419 | parents.clear(); |
| 420 | |
| 421 | callWorldChangeListeners(); |
| 422 | } |
| 423 | |
| 424 | /** |
| 425 | * Returns true, if the keyword is found in any of the places data |