Class StringParameterBuilder


  • public class StringParameterBuilder
    extends java.lang.Object
    Replaces placeholders in strings.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addParameter​(@NotNull java.lang.String key, @NotNull java.lang.String value)
      Adds a parameter key/value pair.
      @NotNull java.lang.String replace​(@NotNull java.lang.CharSequence spec)
      Replaces all parameters in a string.
      • Methods inherited from class java.lang.Object

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

      • StringParameterBuilder

        public StringParameterBuilder()
    • Method Detail

      • addParameter

        public void addParameter​(@NotNull
                                 @NotNull java.lang.String key,
                                 @NotNull
                                 @NotNull java.lang.String value)
        Adds a parameter key/value pair. The key "PATH" is handled differently: the value is a list of path names to search for the argument. The first match is used; if no match is found, a syntax error occurs.
        Parameters:
        key - the parameter's key
        value - the parameter's value
      • replace

        @NotNull
        public @NotNull java.lang.String replace​(@NotNull
                                                 @NotNull java.lang.CharSequence spec)
                                          throws SyntaxErrorException
        Replaces all parameters in a string.
        Parameters:
        spec - the input string
        Returns:
        the output string
        Throws:
        SyntaxErrorException - if a parameter is invalid