\n.
Any special HTML characters will be escaped if and when the content is written out.
| Modifier and Type | Field and Description |
|---|---|
| public static final Text | |
| public static final String | NL
The newline character, to be used when creating |
| private final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public int | charCount()
Overrides jdk. Returns the number of characters of plain text content in this object. |
| pack-priv static int | |
| pack-priv static boolean | Returns: true if there are no \r characters, and false otherwisethe characters to be checked cs)Check for the absence of |
| public boolean | isEmpty()
Implements abstract jdk. Returns true if the content is empty. |
| public boolean | isPhrasingContent()
Overrides jdk. Returns true if the content is "phrasing content". |
| public static CharSequence | Returns: the string with newlines in the form\nthe string text)Returns a given string with all newlines in the form |
| public static Text | Returns: the objectthe text content content)Creates a new object containing immutable text. |
| public String | toString()
Overrides jdk. Returns a string representation of the content. |
| public boolean | write(Writer out, String newline, boolean atNewline)
Implements abstract jdk. Writes content to a writer, using a given newline sequence, which should be
either |
| EMPTY | back to summary |
|---|---|
| public static final Text EMPTY | |
| NL | back to summary |
|---|---|
| public static final String NL The newline character, to be used when creating | |
| string | back to summary |
|---|---|
| private final String string | |
| Text | back to summary |
|---|---|
| private Text(CharSequence content) Constructs an immutable text object.
| |
| charCount | back to summary |
|---|---|
| public int charCount() Overrides jdk. Doc from jdk. Returns the number of characters of plain text content in this object.
| |
| charCount | back to summary |
|---|---|
| pack-priv static int charCount(CharSequence cs) | |
| checkNewlines | back to summary |
|---|---|
| pack-priv static boolean checkNewlines(CharSequence cs) Check for the absence of
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Implements abstract jdk. Doc from jdk. Returns true if the content is empty.
| |
| isPhrasingContent | back to summary |
|---|---|
| public boolean isPhrasingContent() Overrides jdk. Doc from jdk. Returns true if the content is "phrasing content". Phrasing content is content that may appear in a paragraph, such as text, or certain HTML elements.
| |
| normalizeNewlines | back to summary |
|---|---|
| public static CharSequence normalizeNewlines(CharSequence text) Returns a given string with all newlines in the form
| |
| of | back to summary |
|---|---|
| public static Text of(CharSequence content) Creates a new object containing immutable text.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides jdk. Doc from jdk. Returns a string representation of the content.
Newlines are represented by
| |
| write | back to summary |
|---|---|
| public boolean write(Writer out, String newline, boolean atNewline) throws IOException Implements abstract jdk. Doc from jdk. Writes content to a writer, using a given newline sequence, which should be
either
| |