The Bytecode Club

Full Version: StringVars - Pure Java zero dependency solution to create recursive String variables
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
About: StringVars is a zero dependency pure Java solution to create recursive String variables, such as $var$ or %var%.
License: Public Domain
Download Jar:
Add as maven dependency:

Implementation Example
Click here for the StringHolderExample class
StringHolderExample example = new StringHolderExample()
    public String getString(String key)
        return StringVars.getVariableValue('$', ()-> getMap().get(key),(vkey)-> getMap().get(vkey));
example.getMap().put("example", "Example: $var$");
example.getMap().put("var", "This is a great example of how it functions!");

System.out.println("Results: " + example.getString("example"));