public class LocationTree extends Object
LocationTree is an specification of Tree which provides helper methods for
creating a Tree for Location. The key is the locationId and label is name of
Location and the data for tree node is location object itself. Each node has locationId
if its parent location and has a TreeNode map of children of the location. This way it
allows to create a complete tree of location starting from root nodes to the end or lowest level
in the form of tree. A root node is one with parent location null.| Constructor and Description |
|---|
LocationTree() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLocation(Location l) |
void |
buildTreeFromList(List<Location> locations)
WARNING: Overrides existing locations
|
Location |
findLocation(String locationId) |
Map<String,TreeNode<String,Location>> |
getLocationsHierarchy() |
boolean |
hasChildLocation(String locationId,
String childLocationId) |
boolean |
hasLocation(String locationId) |
Copyright © 2018. All rights reserved.