Class DynamicStateMap
- java.lang.Object
-
- fr.univ_artois.lgi2a.similar.microkernel.libs.tools.engine.DynamicStateMap
-
- All Implemented Interfaces:
IPublicDynamicStateMap
public class DynamicStateMap extends Object implements IPublicDynamicStateMap
The map-based implementation of a dynamic state map.- Author:
- Yoann Kubera
-
-
Constructor Summary
Constructors Constructor Description DynamicStateMap()
Builds an initially empty map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IPublicLocalDynamicState
get(LevelIdentifier level)
Gets the dynamic state of a level contained in this map.Set<LevelIdentifier>
keySet()
Gets the levels which dynamic state is contained in this map.void
put(IPublicLocalDynamicState state)
Puts a dynamic state into this map.
-
-
-
Method Detail
-
keySet
public Set<LevelIdentifier> keySet()
Gets the levels which dynamic state is contained in this map.This method has to ensure that two consecutive iterations over this set always return its items in the same order.
- Specified by:
keySet
in interfaceIPublicDynamicStateMap
- Returns:
- The identifier of the levels contained in this map.
-
get
public IPublicLocalDynamicState get(LevelIdentifier level)
Gets the dynamic state of a level contained in this map.- Specified by:
get
in interfaceIPublicDynamicStateMap
- Parameters:
level
- The level of the dynamic state.- Returns:
- The dynamic state of the level.
-
put
public void put(IPublicLocalDynamicState state)
Puts a dynamic state into this map.- Specified by:
put
in interfaceIPublicDynamicStateMap
- Parameters:
state
- The public local dynamic state of to add to this map.
-
-