public static class SimpleFormatters.GetVar extends java.lang.Object implements Formatter
implements a Formatter
the format
method
of which inserts an element from a Map
into the
output.
Constructor and Description |
---|
GetVar(java.lang.String key)
sets up a formatter that inserts
retrieves
key from the Map passed to
format() and appends the result to the output. |
Modifier and Type | Method and Description |
---|---|
void |
format(java.lang.StringBuilder out,
TextStore sp,
java.util.Map<java.lang.Object,java.lang.Object> m)
arranges (some of) the pieces of text found in
st
or m in an implementation dependend manner and
appends them to out . |
public GetVar(java.lang.String key)
sets up a formatter that inserts
retrieves key
from the Map
passed to
format()
and appends the result to the output. If
the key
is not found, nothing is appended.
public void format(java.lang.StringBuilder out, TextStore sp, java.util.Map<java.lang.Object,java.lang.Object> m)
Formatter
arranges (some of) the pieces of text found in st
or m
in an implementation dependend manner and
appends them to out
. Depending on the
implementation, both, st
and m
or even
both may be allowed to be null
.
Postcondition: This method may not change the content of
dest
other than by appending to it.