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 theEntity
with desired name or null if not found.- Parameters:
name
- the name to check the cache for- Returns:
- the desired
Entity
or null
-
update
Updates the cache for anEntity
using its previous name as reference. This will remove the entity from its previous name and add it for its new one.- Parameters:
entity
- theEntity
to update the cache forpreviousName
- the previous name of theEntity
-
remove
Removes anEntity
from the cache by its name.- Parameters:
name
- the name of theEntity
to remove
-