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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(String key) Checks if the storage contains a key.@Nullable TGets the value mapped to the key specified.getKeys()Gets all keys of this storage.Collection<@Nullable T> Gets all values of this storage.@Nullable TPuts a key-value mapping into this storage.@Nullable TRemoves the specified mapping from this map.
-
Constructor Details
-
VolatileStorage
public VolatileStorage()
-
-
Method Details
-
put
Description copied from interface:StoragePuts a key-value mapping into this storage. -
remove
Description copied from interface:StorageRemoves the specified mapping from this map. -
containsKey
Description copied from interface:StorageChecks if the storage contains a key.- Specified by:
containsKeyin interfaceStorage<T>- Parameters:
key- the key- Returns:
- true if the storage contains the key, otherwise false
-
get
Description copied from interface:StorageGets the value mapped to the key specified. -
getKeys
Description copied from interface:StorageGets all keys of this storage. -
getValues
Description copied from interface:StorageGets all values of this storage.
-