Klasse Text
java.lang.Object
org.jdrupes.mdoclet.internal.doclets.toolkit.Content
org.jdrupes.mdoclet.internal.doclets.formats.html.markup.Text
Class for containing immutable string content for HTML tags of javadoc output.
Newlines are always represented by \n. Any special HTML characters will be escaped if and when the content is written out.
-
Feldübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungint
Gibt the number of characters of plain text content in this object zurück.boolean
isEmpty()
Returns true if the content is empty.static CharSequence
Returns a given string with all newlines in the form \n.static Text
of
(CharSequence content) Creates a new object containing immutable text.toString()
Returns a string representation of the content.boolean
Writes content to a writer, using a given newline sequence, which should be either \n or the platform line separator.Von Klasse geerbte Methoden org.jdrupes.mdoclet.internal.doclets.toolkit.Content
add, add, addAll, isDiscardable
-
Felddetails
-
EMPTY
-
NL
The newline character, to be used when creating Content nodes.- Siehe auch:
-
-
Methodendetails
-
of
Creates a new object containing immutable text.- Parameter:
content
- the text content- Gibt zurück:
- the object
-
isEmpty
Beschreibung aus Klasse kopiert:Content
Returns true if the content is empty. -
charCount
Beschreibung aus Klasse kopiert:Content
Gibt the number of characters of plain text content in this object zurück. -
toString
Beschreibung aus Klasse kopiert:Content
Returns a string representation of the content.Newlines are represented by \n.
-
write
Beschreibung aus Klasse kopiert:Content
Writes content to a writer, using a given newline sequence, which should be either \n or the platform line separator.- Angegeben von:
write
in KlasseContent
- Parameter:
out
- the writernewline
- the newline sequence to useatNewline
- whether the writer has just written a newline- Gibt zurück:
- whether the writer has just written a newline
- Löst aus:
IOException
- if an error occurs while writing the output
-
normalizeNewlines
Returns a given string with all newlines in the form \n.The sequences of interest are \n, \r\n, and \r. \n is already in the right form, so can be ignored, leaving code to handle \r\n, and \r.
- Parameter:
text
- the string- Gibt zurück:
- the string with newlines in the form \n
-