|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.github.nill14.shellformat.ShellDictionary
public class ShellDictionary
ShellFormat supports variable replace. Variables are in form ${beer} or $milk. Multiline formatting is preserved. Variable could expand into string with variables.
| Method Summary | |
|---|---|
ShellDictionary |
append(String alias,
Object value)
|
ShellDictionary |
appendAll(String... strings)
|
ShellFormat |
compile()
Compiles a new ShellFormat with the actual dictionary |
String |
format(String... lines)
|
String |
format(String pattern)
|
Map<String,Object> |
toMap()
Converts ShellDictionary into a map |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public Map<String,Object> toMap()
public ShellFormat compile()
public String format(String pattern)
pattern - a pattern to format
public String format(String... lines)
lines - the pattern lines to format
public ShellDictionary appendAll(String... strings)
strings - the pairs of (key, value)
public ShellDictionary append(String alias,
Object value)
alias - a variable to replacevalue - a replacement
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||