Klasse Content
java.lang.Object
org.jdrupes.mdoclet.internal.doclets.toolkit.Content
- Bekannte direkte Unterklassen:
BodyContents
,Comment
,ContentBuilder
,Entity
,Head
,HtmlTree
,RawHtml
,Table
,TableHeader
,Text
,TextBuilder
A content tree for javadoc output pages.
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungadd
(CharSequence stringContent) Adds a string content to the existing content.Adds content to the existing content.<T> Content
addAll
(Collection<T> items, Function<T, Content> mapper) Adds content to the existing content, generated from a collection of items This is an optional operation.int
Gibt the number of characters of plain text content in this object zurück.boolean
Returns true if this content does not affect the output and can be discarded.abstract boolean
isEmpty()
Returns true if the content is empty.toString()
Returns a string representation of the content.abstract boolean
Writes content to a writer, using a given newline sequence, which should be either \n or the platform line separator.
-
Konstruktordetails
-
Content
public Content()
-
-
Methodendetails
-
toString
Returns a string representation of the content.Newlines are represented by \n.
-
add
Adds content to the existing content.This is an optional operation.
- Parameter:
content
- content to be added- Gibt zurück:
- this object
- Löst aus:
UnsupportedOperationException
- if this operation is not supported by a particular implementationIllegalArgumentException
- if the content is not suitable to be added
-
add
Adds a string content to the existing content.This is an optional operation.
- Parameter:
stringContent
- the string content to be added- Gibt zurück:
- this object
- Löst aus:
UnsupportedOperationException
- if this operation is not supported by a particular implementationIllegalArgumentException
- if the content is not suitable to be added
-
addAll
Adds content to the existing content, generated from a collection of items This is an optional operation.- Parameter:
items
- the items to be addedmapper
- the function to create content for each item- Gibt zurück:
- this object
- Löst aus:
UnsupportedOperationException
- if this operation is not supported by a particular implementationIllegalArgumentException
- if the content is not suitable to be added
-
write
Writes content to a writer, using a given newline sequence, which should be either \n or the platform line separator.- Parameter:
writer
- 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
-
isEmpty
Returns true if the content is empty.- Gibt zurück:
- true if no content to be displayed else return false
-
isDiscardable
Returns true if this content does not affect the output and can be discarded.The default implementation considers empty content as discardable.
- Gibt zurück:
- true if this content can be discarded without affecting the output
-
charCount
Gibt the number of characters of plain text content in this object zurück.- Gibt zurück:
- the number of characters of plain text content in this object
-