here.content.hmc2.extracters module#

Item extracters for the HMC Layers.

class here.content.hmc2.extracters.CachedExtracter(collection: List[Any])[source]#

Bases: object

Caches the already requested item from the collection. This way items requested repeatedly from the collection can be called fetched once from the it and reused.

get(index: int)[source]#

Gets the item from the cache. If it is absent in the cache, item from the collection is fetched and cached.

Parameters:

index – index against which item needs to be fetched and/or cached.

Returns:

the item against the index.