Package org.spongepowered.asm.launch
Class GlobalProperties
java.lang.Object
org.spongepowered.asm.launch.GlobalProperties
Access to underlying global property service provided by the current
environment
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
get
(GlobalProperties.Keys key) Get a value from the blackboard and duck-type it to the specified typestatic <T> T
get
(GlobalProperties.Keys key, T defaultValue) Get the value from the blackboard but return defaultValue if the specified key is not set.static String
getString
(GlobalProperties.Keys key, String defaultValue) Get a string from the blackboard, returns default value if not set or null.static void
put
(GlobalProperties.Keys key, Object value) Put the specified value onto the blackboard
-
Method Details
-
get
Get a value from the blackboard and duck-type it to the specified type- Type Parameters:
T
- duck type- Parameters:
key
- blackboard key- Returns:
- value
-
put
Put the specified value onto the blackboard- Parameters:
key
- blackboard keyvalue
- new value
-
get
Get the value from the blackboard but return defaultValue if the specified key is not set.- Type Parameters:
T
- duck type- Parameters:
key
- blackboard keydefaultValue
- value to return if the key is not set or is null- Returns:
- value from blackboard or default value
-
getString
Get a string from the blackboard, returns default value if not set or null.- Parameters:
key
- blackboard keydefaultValue
- default value to return if the specified key is not set or is null- Returns:
- value from blackboard or default
-