cz.cuni.amis.pogamut.multi.communication.worldview.impl
Class AbstractLocalWorldView.LazyCompositeObjectMap<T extends ICompositeWorldObject>

java.lang.Object
  extended by cz.cuni.amis.utils.maps.AbstractLazyMap<WorldObjectId,T>
      extended by cz.cuni.amis.pogamut.multi.communication.worldview.impl.AbstractLocalWorldView.LazyCompositeObjectMap<T>
All Implemented Interfaces:
java.util.Map<WorldObjectId,T>
Enclosing class:
AbstractLocalWorldView

protected class AbstractLocalWorldView.LazyCompositeObjectMap<T extends ICompositeWorldObject>
extends AbstractLazyMap<WorldObjectId,T>

This is a class for lazy maps holding CompositeWorldObjects . These maps will be returned by all getAll methods, the map ensures, that the CompositeObject creation from its parts is delayed as long as possible (it will only be invoked, when the object itself is requested).
If you need to iterate over the map, iterate over the keySet, so you will preserve the lazy-behavior.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Method Summary
protected  T create(java.lang.Object key)
          Creates the Mapped object based on its key.
 boolean setTimeKey(TimeKey newKey)
           
 
Methods inherited from class cz.cuni.amis.utils.maps.AbstractLazyMap
addKey, clear, clearCache, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, setKeySet, size, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Method Detail

setTimeKey

public boolean setTimeKey(TimeKey newKey)

create

protected T create(java.lang.Object key)
Description copied from class: AbstractLazyMap
Creates the Mapped object based on its key. Every LazyMap must implement this.

Specified by:
create in class AbstractLazyMap<WorldObjectId,T extends ICompositeWorldObject>
Returns: