|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.xtend2.lib.StringConcatenation
org.eclipse.xtext.xtend2.lib.StringConcatenation
@Deprecated public class StringConcatenation
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
StringConcatenation.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 StringConcatenation.toString() to get the joined version of a StringConcatenation.
Object.equals(Object) and Object.hashCode() are not specialized for a StringConcatenation, that is, the
semantics are based on identity similar to what StringBuffer and StringBuilder do.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_LINE_DELIMITER
Deprecated. The default line delimiter that is used by instances of StringConcatenation. |
| Constructor Summary | |
|---|---|
StringConcatenation()
Deprecated. Create a new concatenation that uses the system line delimiter. |
|
StringConcatenation(java.lang.String lineDelimiter)
Deprecated. Create a new concatenation with the specified delimiter. |
|
| Method Summary |
|---|
| Methods inherited from class org.eclipse.xtend2.lib.StringConcatenation |
|---|
append, append, append, append, appendImmediate, appendSegments, charAt, getSignificantContent, length, newLine, newLineIfNotEmpty, splitLinesAndNewLines, subSequence, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_LINE_DELIMITER
StringConcatenation. It uses
System.getProperty("line.separator").
| Constructor Detail |
|---|
public StringConcatenation()
System.getProperties(),
System.getProperty(String)public StringConcatenation(java.lang.String lineDelimiter)
lineDelimiter - the used delimiter.
java.lang.IllegalArgumentException - if the lineDelimiter is null or the empty String.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||