Class ZestVariables


  • public class ZestVariables
    extends ZestElement
    The Class ZestTokens.
    • Constructor Detail

      • ZestVariables

        public ZestVariables()
        Instantiates a new zest tokens.
    • Method Detail

      • getTokenStart

        public String getTokenStart()
        Gets the token start.
        Returns:
        the token start
      • setTokenStart

        public void setTokenStart​(String tokenStart)
        Sets the token start.
        Parameters:
        tokenStart - the new token start
      • getTokenEnd

        public String getTokenEnd()
        Gets the token end.
        Returns:
        the token end
      • setTokenEnd

        public void setTokenEnd​(String tokenEnd)
        Sets the token end.
        Parameters:
        tokenEnd - the new token end
      • getVariable

        public String getVariable​(String name)
        Gets the token.
        Parameters:
        name - the name
        Returns:
        the token
      • setVariable

        public void setVariable​(Map<String,​String> tokens)
        Sets the tokens.

        It's created a copy of the given map.

        Parameters:
        tokens - the tokens
      • getVariables

        public List<String[]> getVariables()
        Gets the tokens.
        Returns:
        the tokens
      • getVariablesMap

        public Map<String,​String> getVariablesMap()
        Gets the variables as a map, name to value.
        Returns:
        an unmodifiable map containing the variables.
        Since:
        0.14.0
      • addVariable

        public void addVariable​(String name,
                                String value)
        Adds the token.
        Parameters:
        name - the name
        value - the value
      • addVariable

        public void addVariable​(String name)
        Adds the token.
        Parameters:
        name - the name
      • addVariables

        public void addVariables​(Map<String,​String> tokens)
        Adds the tokens.
        Parameters:
        tokens - the tokens
      • setVariable

        public void setVariable​(String name,
                                String value)
        Sets the token.
        Parameters:
        name - the name
        value - the value
      • replaceInString

        public String replaceInString​(String str,
                                      boolean urlEncode)