Class SettingsMatcher


public class SettingsMatcher
extends java.lang.Object
This class provides a utility function that transforms strings to replace embedded settings with the current values of the setting.
  • Constructor Summary

    Constructor Description
  • Method Summary

    Modifier and Type Method Description
    static void main​(java.lang.String[] args)  
    static java.lang.String replaceSettings​(java.lang.String input)
    Replace all settings variables with their values.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • replaceSettings

      public static java.lang.String replaceSettings​(java.lang.String input)
      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

      public static void main​(java.lang.String[] args)