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

Package class diagram package AbstractLocalWorldView.LazyCompositeObjectMap
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:
Map<WorldObjectId,T>
Enclosing class:
AbstractLocalWorldView

protected class AbstractLocalWorldView.LazyCompositeObjectMap<T extends ICompositeWorldObject>
extends cz.cuni.amis.utils.maps.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
Map.Entry<K,V>
 
Constructor Summary
AbstractLocalWorldView.LazyCompositeObjectMap(long time)
           
 
Method Summary
protected  T create(Object key)
           
 boolean setTimeKey(long newTime)
           
 
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
 

Constructor Detail

AbstractLocalWorldView.LazyCompositeObjectMap

public AbstractLocalWorldView.LazyCompositeObjectMap(long time)
Method Detail

setTimeKey

public boolean setTimeKey(long newTime)

create

protected T create(Object key)
Specified by:
create in class cz.cuni.amis.utils.maps.AbstractLazyMap<WorldObjectId,T extends ICompositeWorldObject>


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.