Class DictionaryUtils
java.lang.Object
io.openems.edge.core.componentmanager.DictionaryUtils
Provides helper utilities to handle
Dictionary
s.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Boolean
getAsBoolean
(Dictionary<String, Object> dict, String key) Get the Dictionary value as Boolean.static Integer
getAsInteger
(Dictionary<String, Object> dict, String key) Get the Dictionary value as Integer.getAsOptionalBoolean
(Dictionary<String, Object> dict, String key) Get the Dictionary value as Optional Boolean.getAsOptionalInteger
(Dictionary<String, Object> dict, String key) Get the Dictionary value as Optional Integer.getAsOptionalString
(Dictionary<String, Object> dict, String key) Get the Dictionary value as Optional String.static String
getAsString
(Dictionary<String, Object> dict, String key) Get the Dictionary value as String.
-
Constructor Details
-
DictionaryUtils
public DictionaryUtils()
-
-
Method Details
-
getAsString
Get the Dictionary value as String.- Parameters:
dict
- theDictionary
key
- the identifier key- Returns:
- the value as
String
-
getAsOptionalString
Get the Dictionary value as Optional String.- Parameters:
dict
- theDictionary
key
- the identifier key- Returns:
- the value as
Optional
String
-
getAsInteger
Get the Dictionary value as Integer.- Parameters:
dict
- theDictionary
key
- the identifier key- Returns:
- the value as
Integer
-
getAsOptionalInteger
Get the Dictionary value as Optional Integer.- Parameters:
dict
- theDictionary
key
- the identifier key- Returns:
- the value as
Optional
Integer
-
getAsBoolean
Get the Dictionary value as Boolean.- Parameters:
dict
- theDictionary
key
- the identifier key- Returns:
- the value as
Integer
-
getAsOptionalBoolean
Get the Dictionary value as Optional Boolean.- Parameters:
dict
- theDictionary
key
- the identifier key- Returns:
- the value as
Optional
Integer
-