public interface Storage
Internal suite-specific storage exposed to test suite providers.
-
Method Summary
Modifier and TypeMethodDescription<T> TRetrieve value matching providedkeyfrom the storage.<T> TgetOrDefault(String key, Class<T> cls, T defaultValue) Retrieve value providedkeyfrom the storage ordefaultValuewhen storage does not contain providedkey.voidStore value under providedkeyin the storage.voidputOrReplace(String key, Object value) Store value under providedkeyin the storage.
-
Method Details
-
get
Retrieve value matching providedkeyfrom the storage.- Type Parameters:
T- target type of the value- Parameters:
key- key of the valuecls- target type of the value- Returns:
- value from the storage or
nullwhen providedkeywas not found
-
getOrDefault
Retrieve value providedkeyfrom the storage ordefaultValuewhen storage does not contain providedkey.- Type Parameters:
T- target type of the value- Parameters:
key- key of the valuecls- target type of the valuedefaultValue- value to return when providedkeywas not found- Returns:
- value from the storage or
nullwhen no such value is stored
-
put
Store value under providedkeyin the storage. Value will not be stored when already exists.- Parameters:
key- key of the valuevalue- value to store
-
putOrReplace
Store value under providedkeyin the storage. Value will replace stored value nder providedkeywhen already exists.- Parameters:
key- key of the valuevalue- value to store
-