Class DataStore
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_base.DataStore
Store accessible to all matchers where variables and results can be persisted in.
Available as local store and as global store.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstructorInitialize the Datastore with Properties -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Delete store.boolean
containsKey
(String key) Check if key exists in store.<T> T
This method does not cast the object, but the calling method.Get an object from the data store using a key.static DataStore
Get global data store instance.void
Put an object to the data store.Transform this Datastore into a Properties object.
-
Field Details
-
instance
Singleton instance -
centralStore
Central Store Object
-
-
Constructor Details
-
DataStore
public DataStore()Constructor -
DataStore
Initialize the Datastore with Properties- Parameters:
p
- the properties to be populated.
-
-
Method Details
-
getGlobal
Get global data store instance.- Returns:
- Instance of the global data store.
-
put
Put an object to the data store.- Parameters:
key
- Keyvalue
- Value
-
get
Get an object from the data store using a key.- Parameters:
key
- Key used to retrieve object.clazz
- The class.- Returns:
- Value stored for key.
-
get
This method does not cast the object, but the calling method. See also this stackoverflow question.- Type Parameters:
T
- The generic parameter.- Parameters:
key
- Key used to retrieve value.- Returns:
- Value stored for key.
-
containsKey
Check if key exists in store.- Parameters:
key
- Key that shall be looked up.- Returns:
- true if key contained, else false.
-
clear
public void clear()Delete store. -
toProperties
Transform this Datastore into a Properties object.- Returns:
- the converted Properties object.
-