java.lang.Object
technology.sola.ecs.cache.EntityNameCache
The EntityNameCache class handles caching
Entity by their name for quicker searching by name.-
Constructor Details
-
EntityNameCache
public EntityNameCache()
-
-
Method Details
-
get
Returns theEntitywith desired name or null if not found.- Parameters:
name- the name to check the cache for- Returns:
- the desired
Entityor null
-
update
Updates the cache for anEntityusing its previous name as reference. This will remove the entity from its previous name and add it to its new one.- Parameters:
entity- theEntityto update the cache forpreviousName- the previous name of theEntity
-
remove
Removes anEntityfrom the cache by its name.- Parameters:
name- the name of theEntityto remove
-