|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Indentor
Create the indent String
for ArgumentFormatter
s for use in multi-line results. This should only be
used by ArgumentFormatter
s when they need to output multiple lines of text.
The indent should be used on all but the first line in a multi-line response. The first line should have no indent as
it will be output after the LogMeta
or appended to the results of some other ArgumentFormatter
.
If any etymologists can tell me whether "Indentor" or "Indenter" is the correct word, I'd appreciate it. (I choose
the "or" version because that matched Comparator
.)
Method Summary | |
---|---|
String |
createIndent(int indentLevel)
Returns the string that should be used for indenting. |
void |
indent(List<String> values,
int indentLevel,
boolean indentFirstLine)
Indents a collection of Strings, replacing the un-indented strings with indented Strings. |
void |
indent(List<String> values,
List<Integer> indentLevels)
Indents a collection of strings, replacing the un-indented strings with indented Strings of varying indent levels. |
Method Detail |
---|
String createIndent(int indentLevel)
void indent(List<String> values, int indentLevel, boolean indentFirstLine)
values
- It is HIGHLY RECOMMENDED that this collection have O(1) get and set operations.indentFirstLine
- Whether to indent the first line or not. For most uses this will be false, in accordance
with the behavior expected by ArgumentFormatter.format(Object, Collection, int)
void indent(List<String> values, List<Integer> indentLevels)
indent(List, int, boolean)
except that each String is indented a variable number of
times AND the first line will be indented (if desired). The index used by the "values" parameter is used to find
the indent level in parameter "indentLevels".
values
- It is HIGHLY RECOMMENDED that this collection have O(1) get and set operations.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |