Package my.uum.model
Class LocationHierarchy
java.lang.Object
my.uum.model.LocationHierarchy
Represents a hierarchical structure of locations in Malaysia.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a node in the location hierarchy. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLocation(String category, String name, String type) Adds a location to the hierarchy.getCategory(String category) Gets locations for a specific category.Gets the complete hierarchy structure.
-
Constructor Details
-
LocationHierarchy
public LocationHierarchy()Creates a new LocationHierarchy instance.
-
-
Method Details
-
addLocation
Adds a location to the hierarchy.- Parameters:
category- Category of the locationname- Name of the locationtype- Type of the location
-
getCategory
Gets locations for a specific category.- Parameters:
category- Category name- Returns:
- Map of locations in the category
-
getHierarchy
Gets the complete hierarchy structure.- Returns:
- Complete location hierarchy
-