Class PF3.SuperMap<T extends GObject>
java.lang.Object
com.yetnt.utils.tuple.Pair<HashMultiMap<String,T>,HashMap<String,T>>
com.j3d.storage.files.protocol.proj.PF3.SuperMap<T>
- Type Parameters:
T- The type ofGObjectstored in the maps.
- Enclosing class:
PF3
public static class PF3.SuperMap<T extends GObject>
extends Pair<HashMultiMap<String,T>,HashMap<String,T>>
A utility class that extends
Pair to store two maps related to some GObject.
It holds a HashMultiMap to map parent thing IDs to a list of geometric objects,
and a HashMap to map individual geometric object IDs to the objects themselves.-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves a list of geometric objects associated with a specific parent thing ID.getIdMap()Returns theHashMapthat maps geometric object IDs to geometric objects.Returns theHashMultiMapthat maps parent thing IDs to geometric objects.
-
Constructor Details
-
SuperMap
Constructs a newSuperMapwith the given parent map and ID map.- Parameters:
thingParentMap- AHashMultiMapmapping parent thing IDs to geometric objects.idMap- AHashMapmapping geometric object IDs to geometric objects.
-
-
Method Details
-
getThingParentMap
Returns theHashMultiMapthat maps parent thing IDs to geometric objects.- Returns:
- The parent thing map.
-
getIdMap
Returns theHashMapthat maps geometric object IDs to geometric objects.- Returns:
- The ID map.
-
fromThing
Retrieves a list of geometric objects associated with a specific parent thing ID. If no objects are found for the given thing ID, an emptyArrayListis returned.- Parameters:
thingId- The ID of the parent thing.- Returns:
- An
ArrayListof geometric objects belonging to the specified thing.
-