Top Description Inners Fields Constructors Methods
org.eclipse.xtend2.lib

public Class StringConcatenation

extends Object
implements CharSequence
Class Inheritance
All Implemented Interfaces
java.lang.CharSequence
Annotations
@GwtCompatible
Imports
java.util.ArrayList, .Collections, .List, org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation, com.google.common.annotations.GwtCompatible

A StringConcatenation allows for efficient, indentation aware concatenation of character sequences.

In addition to the methods that are specified by the implemented interface CharSequence, there are some other public operations that allow to modify the contents of this sequence. The string representation of arbitrary objects can be appended to an instance of StringConcatenation. There are overloaded variants of append(Object, String) that allow to pass an indentation that should be applied to each line of the appended content. Each line break that is part of the new content will be replaced by the line delimiter that was configured for this StringConcatenation.

The append-operation ignores null arguments. This is different to what StringBuffer or StringBuilder do and that's the reason why the Appendable interface is not fulfilled by a StringConcatenation.

The object uses an internal List of Strings that is concatenated on demand to a complete sequence. Use toString() to get the joined version of a StringConcatenation.

equals(Object) and hashCode() are not specialized for a StringConcatenation, that is, the semantics are based on identity similar to what StringBuffer and StringBuilder do.

Author
Sebastian Zarnekow - Initial contribution and API
Since
2.3

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Field Summary

Modifier and TypeField and Description
private String
cachedToString

A cached string representation.

public static final String
DEFAULT_LINE_DELIMITER

The default line delimiter that is used by instances of StringConcatenation.

private int
lastSegmentsSize

Internal hint for the size of segments.

private final String
lineDelimiter

The configured delimiter.

private final ArrayList<String>
segments

The complete content of this sequence.

private static final int
SEGMENTS_INITIAL_SIZE

Initial allocation size of the segments array.

private static final int
SEGMENTS_SIZE_INCREMENT

Number of elements to add to segments array when we need to grow it.

Constructor Summary

AccessConstructor and Description
public
StringConcatenation()

Create a new concatenation that uses the system line delimiter.

public
StringConcatenation(String
the used delimiter.
lineDelimiter
)

Create a new concatenation with the specified delimiter.

Method Summary

Modifier and TypeMethod and Description
public void
append(Object
the to-be-appended object.
object
)

Append the string representation of the given object to this sequence.

public void
append(String
the to-be-appended string.
str
)

Append the given string to this sequence.

public void
append(StringConcatenation
the to-be-appended StringConcatenation.
concat
)

Append the contents of a given StringConcatenation to this sequence.

public void
append(StringConcatenationClient
the to-be-appended StringConcatenationClient.
client
)

Append the contents of a given StringConcatenationClient to this sequence.

protected void
append(Object object, int index)

private void
append(String text, int index)

public void
append(Object
the appended object.
object
,
String
the indentation string that should be prepended. May not be null.
indentation
)

Add the string representation of the given object to this sequence.

public void
append(String
the appended string.
str
,
String
the indentation string that should be prepended. May not be null.
indentation
)

Add the given string to this sequence.

public void
append(StringConcatenation
the to-be-appended StringConcatenation.
concat
,
String
the indentation string that should be prepended. May not be null.
indentation
)

Append the contents of a given StringConcatenation to this sequence.

public void
append(StringConcatenationClient
the to-be-appended StringConcatenationClient.
client
,
String
the indentation string that should be prepended. May not be null.
indentation
)

Append the contents of a given StringConcatenationClient to this sequence.

protected void
append(Object
the to-be-appended object.
object
,
String
the indentation string that should be prepended. May not be null.
indentation
,
int
the index in the list of segments.
index
)

Add the string representation of the given object to this sequence at the given index.

private void
append(String indentation, String text, int index)

public void
appendImmediate(Object
the to-be-appended object.
object
,
String
the indentation string that should be prepended. May not be null.
indentation
)

Add the string representation of the given object to this sequence immediately.

private void
appendSegment(int index, String segment)

protected void
appendSegments(String
the indentation string that should be prepended. May not be null.
indentation
,
int
the index in this instance's list of segments.
index
,
List<String>
the to-be-appended segments. May not be null.
otherSegments
,
String
the line delimiter that was used in the otherSegments list.
otherDelimiter
)

Add the list of segments to this sequence at the given index.

protected void
appendSegments(int
the index in this instance's list of segments.
index
,
List<String>
the to-be-appended segments. May not be null.
otherSegments
,
String
the line delimiter that was used in the otherSegments list.
otherDelimiter
)

Add the list of segments to this sequence at the given index.

protected void
appendSegments(int
the index in this instance's list of segments.
index
,
List<String>
the to-be-appended segments. May not be null.
otherSegments
)

Add the list of segments to this sequence at the given index.

public char
charAt(int index)

Implements java.lang.CharSequence.charAt.

Returns the char value at the specified index.

private List<String>
continueSplitting(String text, int idx)

protected final List<String>

Returns:

the actual content of this instance. Never null.
getContent
()

Return the actual content of this sequence, including all trailing whitespace.

protected String

Returns:

the line delimiter
getLineDelimiter
()

Allows subtypes to access the configured line delimiter.

protected List<String>

Returns:

the significant content of this instance. Never null.
getSignificantContent
()

Compute the significant content of this sequence.

protected String

Returns:

the string representation. May not be null.
getStringRepresentation
(Object
the object that shall be appended. Never null.
object
)

Computes the string representation of the given object.

private void
growSegments(int increment)

private static int
public int
length()

Implements java.lang.CharSequence.length.

Returns the length of this character sequence.

public void
newLine()

Add a newline to this sequence according to the configured lineDelimiter.

public void
newLineIfNotEmpty()

Add a newline to this sequence according to the configured lineDelimiter if the last line contains something besides whitespace.

protected List<String>

Returns:

a list of segments. Is never null.
splitLinesAndNewLines
(String
the to-be-splitted text. May be null.
text
)

Return a list of segments where each segment is either the content of a line in the given text or a line-break according to the configured delimiter.

public CharSequence
subSequence(int start, int end)

Implements java.lang.CharSequence.subSequence.

Returns a CharSequence that is a subsequence of this sequence.

public String
toString()

Overrides java.lang.Object.toString.

Implements java.lang.CharSequence.toString.

Returns a string containing the characters in this sequence in the same order as this sequence.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

cachedToStringback to summary
private String cachedToString

A cached string representation.

DEFAULT_LINE_DELIMITERback to summary
public static final String DEFAULT_LINE_DELIMITER

The default line delimiter that is used by instances of StringConcatenation. It uses System.getProperty("line.separator").

Since
2.3
lastSegmentsSizeback to summary
private int lastSegmentsSize

Internal hint for the size of segments. We cache this value so we do not have to perform costly calculations.

lineDelimiterback to summary
private final String lineDelimiter

The configured delimiter. It will be used to replace possibly existing delimiters of to-be-appended content.

segmentsback to summary
private final ArrayList<String> segments

The complete content of this sequence. It may contain insignificant trailing parts that are not part of the final string representation that can be obtained by toString(). Insignificant parts will not be considered by length(), charAt(int) or subSequence(int, int).

SEGMENTS_INITIAL_SIZEback to summary
private static final int SEGMENTS_INITIAL_SIZE

Initial allocation size of the segments array.

SEGMENTS_SIZE_INCREMENTback to summary
private static final int SEGMENTS_SIZE_INCREMENT

Number of elements to add to segments array when we need to grow it. This should be a power-of-two so we can perform efficient modulo operation.

Constructor Detail

StringConcatenationback to summary
public StringConcatenation()

Create a new concatenation that uses the system line delimiter.

See Also
System#getProperties(), System#getProperty(String)
StringConcatenationback to summary
public StringConcatenation(String lineDelimiter)

Create a new concatenation with the specified delimiter.

Parameters
lineDelimiter:String

the used delimiter.

Exceptions
IllegalArgumentException:
if the lineDelimiter is null or the empty String.
Since
2.3

Method Detail

appendback to summary
public void append(Object object)

Append the string representation of the given object to this sequence. Does nothing if the object is null.

Parameters
object:Object

the to-be-appended object.

appendback to summary
public void append(String str)

Append the given string to this sequence. Does nothing if the string is null.

Parameters
str:String

the to-be-appended string.

Since
2.11
appendback to summary
public void append(StringConcatenation concat)

Append the contents of a given StringConcatenation to this sequence. Does nothing if the concatenation is null.

Parameters
concat:StringConcatenation

the to-be-appended StringConcatenation.

Since
2.11
appendback to summary
public void append(StringConcatenationClient client)

Append the contents of a given StringConcatenationClient to this sequence. Does nothing if the argument is null.

Parameters
client:StringConcatenationClient

the to-be-appended StringConcatenationClient.

Since
2.11
appendback to summary
protected void append(Object object, int index)
appendback to summary
private void append(String text, int index)
appendback 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.

Parameters
object:Object

the appended object.

indentation:String

the indentation string that should be prepended. May not be null.

appendback to summary
public void append(String str, String indentation)

Add the given string 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.

Parameters
str:String

the appended string.

indentation:String

the indentation string that should be prepended. May not be null.

Since
2.11
appendback to summary
public void append(StringConcatenation concat, String indentation)

Append the contents of a given StringConcatenation to this sequence. Does nothing if the concatenation is null. The given indentation will be prepended to each line except the first one.

Parameters
concat:StringConcatenation

the to-be-appended StringConcatenation.

indentation:String

the indentation string that should be prepended. May not be null.

Since
2.11
appendback to summary
public void append(StringConcatenationClient client, String indentation)

Append the contents of a given StringConcatenationClient to this sequence. Does nothing if that argument is null. The given indentation will be prepended to each line except the first one.

Parameters
client:StringConcatenationClient

the to-be-appended StringConcatenationClient.

indentation:String

the indentation string that should be prepended. May not be null.

Since
2.11
appendback to summary
protected void append(Object object, String indentation, int index)

Add the string representation of the given object to this sequence at the given index. The given indentation will be prepended to each line except the first one if the object has a multi-line string representation.

Parameters
object:Object

the to-be-appended object.

indentation:String

the indentation string that should be prepended. May not be null.

index:int

the index in the list of segments.

appendback to summary
private void append(String indentation, String text, int index)
appendImmediateback 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.

Parameters
object:Object

the to-be-appended object.

indentation:String

the indentation string that should be prepended. May not be null.

appendSegmentback to summary
private void appendSegment(int index, String segment)
appendSegmentsback to summary
protected void appendSegments(String indentation, int index, List<String> otherSegments, String otherDelimiter)

Add the list of segments to this sequence at the given index. The given indentation will be prepended to each line except the first one if the object has a multi-line string representation.

Parameters
indentation:String

the indentation string that should be prepended. May not be null.

index:int

the index in this instance's list of segments.

otherSegments:List<String>

the to-be-appended segments. May not be null.

otherDelimiter:String

the line delimiter that was used in the otherSegments list.

appendSegmentsback to summary
protected void appendSegments(int index, List<String> otherSegments, String otherDelimiter)

Add the list of segments to this sequence at the given index. The given indentation will be prepended to each line except the first one if the object has a multi-line string representation.

Parameters
index:int

the index in this instance's list of segments.

otherSegments:List<String>

the to-be-appended segments. May not be null.

otherDelimiter:String

the line delimiter that was used in the otherSegments list.

Since
2.5
appendSegmentsback to summary
protected void appendSegments(int index, List<String> otherSegments)

Add the list of segments to this sequence at the given index. The given indentation will be prepended to each line except the first one if the object has a multi-line string representation.

Parameters
index:int

the index in this instance's list of segments.

otherSegments:List<String>

the to-be-appended segments. May not be null.

Since
2.5
charAtback to summary
public char charAt(int index)

Implements java.lang.CharSequence.charAt.

Doc from java.lang.CharSequence.charAt.

Returns the char value at the specified index. An index ranges from zero to length() - 1. The first char value of the sequence is at index zero, the next at index one, and so on, as for array indexing.

If the char value specified by the index is a surrogate, the surrogate value is returned.

Only the significant content of this sequence is considered.

Annotations
@Override
continueSplittingback to summary
private List<String> continueSplitting(String text, int idx)
getContentback to summary
protected final List<String> getContent()

Return the actual content of this sequence, including all trailing whitespace. The return value is unsafe, that is modification to this StringConcatenation will cause changes in a previously obtained result and vice versa.

Returns:List<String>

the actual content of this instance. Never null.

Since
2.8
getLineDelimiterback to summary
protected String getLineDelimiter()

Allows subtypes to access the configured line delimiter.

Returns:String

the line delimiter

Since
2.5
getSignificantContentback to summary
protected List<String> getSignificantContent()

Compute the significant content of this sequence. That is, trailing whitespace after the last line-break will be ignored if the last line contains only whitespace. The return value is unsafe, that is modification to this StringConcatenation will cause changes in a previously obtained result and vice versa.

Returns:List<String>

the significant content of this instance. Never null.

getStringRepresentationback to summary
protected String getStringRepresentation(Object object)

Computes the string representation of the given object. The default implementation will just invoke Object#toString() but clients may override and specialize the logic.

Parameters
object:Object

the object that shall be appended. Never null.

Returns:String

the string representation. May not be null.

Since
2.5
growSegmentsback to summary
private void growSegments(int increment)
initialSegmentSizeback to summary
private static int initialSegmentSize(String text)
lengthback to summary
public int length()

Implements java.lang.CharSequence.length.

Doc from java.lang.CharSequence.length.

Returns the length of this character sequence. The length is the number of 16-bit chars in the sequence.

Only the significant content of this sequence is considered.

Annotations
@Override
newLineback to summary
public void newLine()

Add a newline to this sequence according to the configured lineDelimiter.

newLineIfNotEmptyback to summary
public void newLineIfNotEmpty()

Add a newline to this sequence according to the configured lineDelimiter if the last line contains something besides whitespace.

splitLinesAndNewLinesback to summary
protected List<String> splitLinesAndNewLines(String text)

Return a list of segments where each segment is either the content of a line in the given text or a line-break according to the configured delimiter. Existing line-breaks in the text will be replaced by this's instances delimiter.

Parameters
text:String

the to-be-splitted text. May be null.

Returns:List<String>

a list of segments. Is never null.

subSequenceback to summary
public CharSequence subSequence(int start, int end)

Implements java.lang.CharSequence.subSequence.

Doc from java.lang.CharSequence.subSequence.

Returns a CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at index end - 1. The length (in chars) of the returned sequence is end - start, so if start == end then an empty sequence is returned.

Only the significant content of this sequence is considered.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Implements java.lang.CharSequence.toString.

Doc from java.lang.CharSequence.toString.

Returns a string containing the characters in this sequence in the same order as this sequence. The length of the string will be the length of this sequence.

Annotations
@Override
org.eclipse.xtend2.lib back to summary

private Class StringConcatenation.IndentedTarget

extends SimpleTarget
Class Inheritance

Decorates an existing StringConcatenation as a TargetStringConcatenation. This implementation keeps track of the current indentation at the position where the clients should write into the decorated StringConcatenation.

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
private
IndentedTarget(StringConcatenation target, String indentation, int index)

Method Summary

Modifier and TypeMethod and Description
public void
append(Object object, String indentation)

Overrides org.eclipse.xtend2.lib.StringConcatenation.SimpleTarget.append.

Implements org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.append.

Add the string representation of the given object to this sequence.

public void
append(Object object)

Overrides org.eclipse.xtend2.lib.StringConcatenation.SimpleTarget.append.

Implements org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.append.

Append the string representation of the given object to this sequence.

public void
appendImmediate(Object object, String indentation)

Overrides org.eclipse.xtend2.lib.StringConcatenation.SimpleTarget.appendImmediate.

Implements org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.appendImmediate.

Add the string representation of the given object to this sequence immediately.

public void
public void
newLineIfNotEmpty()

Overrides org.eclipse.xtend2.lib.StringConcatenation.SimpleTarget.newLineIfNotEmpty.

Implements org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.newLineIfNotEmpty.

Add a newline to this sequence according to the configured lineDelimiter if the last line contains something besides whitespace.

Inherited from org.eclipse.xtend2.lib.StringConcatenation.SimpleTarget:
charAtlengthsubSequence

Field Detail

indentationback to summary
private final String indentation

Constructor Detail

IndentedTargetback to summary
private IndentedTarget(StringConcatenation target, String indentation, int index)

Method Detail

appendback to summary
public void append(Object object, String indentation)

Overrides org.eclipse.xtend2.lib.StringConcatenation.SimpleTarget.append.

Implements org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.append.

Doc from org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.append.

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.

Annotations
@Override
appendback to summary
public void append(Object object)

Overrides org.eclipse.xtend2.lib.StringConcatenation.SimpleTarget.append.

Implements org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.append.

Doc from org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.append.

Append the string representation of the given object to this sequence. Does nothing if the object is null.

Annotations
@Override
appendImmediateback to summary
public void appendImmediate(Object object, String indentation)

Overrides org.eclipse.xtend2.lib.StringConcatenation.SimpleTarget.appendImmediate.

Implements org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.appendImmediate.

Doc from org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.appendImmediate.

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.

Annotations
@Override
newLineback to summary
public void newLine()

Overrides org.eclipse.xtend2.lib.StringConcatenation.SimpleTarget.newLine.

Implements org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.newLine.

Doc from org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.newLine.

Add a newline to this sequence according to the configured lineDelimiter.

Annotations
@Override
newLineIfNotEmptyback to summary
public void newLineIfNotEmpty()

Overrides org.eclipse.xtend2.lib.StringConcatenation.SimpleTarget.newLineIfNotEmpty.

Implements org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.newLineIfNotEmpty.

Doc from org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.newLineIfNotEmpty.

Add a newline to this sequence according to the configured lineDelimiter if the last line contains something besides whitespace.

Annotations
@Override
org.eclipse.xtend2.lib back to summary

private Class StringConcatenation.SimpleTarget

extends Object
implements TargetStringConcatenation
Class Inheritance
All Implemented Interfaces
org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation, java.lang.CharSequence
Known Direct Subclasses
org.eclipse.xtend2.lib.StringConcatenation.IndentedTarget

Decorates an existing StringConcatenation as a TargetStringConcatenation. It maintains the index at which new elements should inserted into the existing concatenation.

Field Summary

Modifier and TypeField and Description
private final int
private final StringConcatenation

Constructor Summary

AccessConstructor and Description
private
SimpleTarget(StringConcatenation target, int index)

Method Summary

Modifier and TypeMethod and Description
public void
append(Object object, String indentation)

Implements org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.append.

Add the string representation of the given object to this sequence.

public void
append(Object object)

Implements org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.append.

Append the string representation of the given object to this sequence.

public void
appendImmediate(Object object, String indentation)

Implements org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.appendImmediate.

Add the string representation of the given object to this sequence immediately.

public char
charAt(int index)

Implements java.lang.CharSequence.charAt.

Returns the char value at the specified index.

public int
length()

Implements java.lang.CharSequence.length.

Returns the length of this character sequence.

public void
newLine()

Implements org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.newLine.

Add a newline to this sequence according to the configured lineDelimiter.

public void
newLineIfNotEmpty()

Implements org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.newLineIfNotEmpty.

Add a newline to this sequence according to the configured lineDelimiter if the last line contains something besides whitespace.

public CharSequence
subSequence(int start, int end)

Implements java.lang.CharSequence.subSequence.

Returns a CharSequence that is a subsequence of this sequence.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

offsetFixupback to summary
private final int offsetFixup
targetback to summary
private final StringConcatenation target

Constructor Detail

SimpleTargetback to summary
private SimpleTarget(StringConcatenation target, int index)

Method Detail

appendback to summary
public void append(Object object, String indentation)

Implements org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.append.

Doc from org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.append.

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.

Annotations
@Override
appendback to summary
public void append(Object object)

Implements org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.append.

Doc from org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.append.

Append the string representation of the given object to this sequence. Does nothing if the object is null.

Annotations
@Override
appendImmediateback to summary
public void appendImmediate(Object object, String indentation)

Implements org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.appendImmediate.

Doc from org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.appendImmediate.

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.

Annotations
@Override
charAtback to summary
public char charAt(int index)

Implements java.lang.CharSequence.charAt.

Doc from java.lang.CharSequence.charAt.

Returns the char value at the specified index. An index ranges from zero to length() - 1. The first char value of the sequence is at index zero, the next at index one, and so on, as for array indexing.

If the char value specified by the index is a surrogate, the surrogate value is returned.

Annotations
@Override
lengthback to summary
public int length()

Implements java.lang.CharSequence.length.

Doc from java.lang.CharSequence.length.

Returns the length of this character sequence. The length is the number of 16-bit chars in the sequence.

Annotations
@Override
newLineback to summary
public void newLine()

Implements org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.newLine.

Doc from org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.newLine.

Add a newline to this sequence according to the configured lineDelimiter.

Annotations
@Override
newLineIfNotEmptyback to summary
public void newLineIfNotEmpty()

Implements org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.newLineIfNotEmpty.

Doc from org.eclipse.xtend2.lib.StringConcatenationClient.TargetStringConcatenation.newLineIfNotEmpty.

Add a newline to this sequence according to the configured lineDelimiter if the last line contains something besides whitespace.

Annotations
@Override
subSequenceback to summary
public CharSequence subSequence(int start, int end)

Implements java.lang.CharSequence.subSequence.

Doc from java.lang.CharSequence.subSequence.

Returns a CharSequence that is a subsequence of this sequence. The subsequence starts with the char value at the specified index and ends with the char value at index end - 1. The length (in chars) of the returned sequence is end - start, so if start == end then an empty sequence is returned.

Annotations
@Override