Package org.openhab.core.test.storage
Class VolatileStorage<T>
java.lang.Object
org.openhab.core.test.storage.VolatileStorage<T>
- All Implemented Interfaces:
Storage<T>
A
Storage
implementation which stores it's data in-memory.- Author:
- Thomas Eichstaedt-Engelen - Initial contribution, Kai Kreuzer - improved return values
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsKey
(String key) Checks if the storage contains a key.@Nullable T
Gets the value mapped to the key specified.getKeys()
Gets all keys of this storage.Collection<@Nullable T>
Gets all values of this storage.@Nullable T
Puts a key-value mapping into this storage.@Nullable T
Removes the specified mapping from this map.
-
Constructor Details
-
VolatileStorage
public VolatileStorage()
-
-
Method Details
-
put
Description copied from interface:Storage
Puts a key-value mapping into this storage. -
remove
Description copied from interface:Storage
Removes the specified mapping from this map. -
containsKey
Description copied from interface:Storage
Checks if the storage contains a key.- Specified by:
containsKey
in interfaceStorage<T>
- Parameters:
key
- the key- Returns:
- true if the storage contains the key, otherwise false
-
get
Description copied from interface:Storage
Gets the value mapped to the key specified. -
getKeys
Description copied from interface:Storage
Gets all keys of this storage. -
getValues
Description copied from interface:Storage
Gets all values of this storage.
-