StringConcatenation
to append content to it. This puts clients into the position that they can
fully control the used instance, e.g. they can use a custom line delimiter
or override StringConcatenation#getStringRepresentation(Object).
| Modifier and Type | Class and Description |
|---|---|
| public static interface | StringConcatenationClient.
A |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | appendTo(StringConcatenationClient.
the targetTargetStringConcatenation to-append-to. Never null.Implementors have to override this method and feed the given target instance. |
| public static void | appendTo(StringConcatenationClient
the client, StringConcatenationClient.StringConcatenationClient on which appendTo(TargetStringConcatenation) is
invoked.the targetTargetStringConcatenation to-append-to. Never null.Delegates to |
| StringConcatenationClient | back to summary |
|---|---|
| public StringConcatenationClient() | |
| appendTo | back to summary |
|---|---|
| protected void appendTo(StringConcatenationClient. Implementors have to override this method and feed the given target instance.
| |
| appendTo | back to summary |
|---|---|
| public static void appendTo(StringConcatenationClient client, StringConcatenationClient. Delegates to
| |
TargetStringConcatenation models the public interface of a
StringConcatenation so implementations of the StringConcatenationClient
can append their content properly.
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | appendImmediate(Object
the to-be-appended object. object, String the indentation string that should be prepended. May not be indentation)null.Add the string representation of the given object to this sequence immediately. |
| public void | |
| public void | newLineIfNotEmpty()
Add a newline to this sequence according to the configured lineDelimiter if the last line contains something besides whitespace. |
| append | back to summary |
|---|---|
| public void append(Object object, String indentation) Add the string representation of the given object to this sequence. The given indentation will be prepended to each line except the first one if the object has a multi-line string representation. | |
| append | back to summary |
|---|---|
| public void append(Object object) Append the string representation of the given object to this sequence. Does nothing if the object is
| |
| appendImmediate | back to summary |
|---|---|
| public void appendImmediate(Object object, String indentation) Add the string representation of the given object to this sequence immediately. That is, all the trailing whitespace of this sequence will be ignored and the string is appended directly after the last segment that contains something besides whitespace. The given indentation will be prepended to each line except the first one if the object has a multi-line string representation. | |
| newLine | back to summary |
|---|---|
| public void newLine() Add a newline to this sequence according to the configured lineDelimiter. | |
| newLineIfNotEmpty | back to summary |
|---|---|
| public void newLineIfNotEmpty() Add a newline to this sequence according to the configured lineDelimiter if the last line contains something besides whitespace. | |