Package skyview.request
Class SettingsMatcher
java.lang.Object
skyview.request.SettingsMatcher
This class provides a utility function that transforms strings
to replace embedded settings with the current values of the setting.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
static String
replaceSettings
(String input) Replace all settings variables with their values.
-
Constructor Details
-
SettingsMatcher
public SettingsMatcher()
-
-
Method Details
-
replaceSettings
Replace all settings variables with their values. This function takes the input string and looks for all settings that are embedded in the string and replaces those settings with the value of that setting. E.g., given a string "The survey is $survey and the scale is $scale." the method will look for the settings survey and scale and in the global Settings and replace these substrings with their current values. E.g., the previous might return with "The survey is Digitized Sky Survey and the scale is 0.00133." If a setting has multiple values, only the first is used. If no value is found for the setting, then the text is left unchanged. -
main
-