| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Content | |
| public Content | Returns: this objectthe string content to be added stringContent)Adds a string content to the existing content. |
| public <T> Content | Returns: this objectthe items to be added items, Function<T, Content> the function to create content for each item mapper)Adds content to the existing content, generated from a collection of items This is an optional operation. |
| public int | Returns: the number of characters of plain text content in this objectReturns the number of characters of plain text content in this object. |
| public boolean | Returns: true if this content can be discarded without affecting the outputReturns true if this content does not affect the output and can be discarded. |
| public abstract boolean | Returns: true if no content to be displayed else return falseReturns true if the content is empty. |
| public boolean | Returns: true if the content is "phrasing content"Returns true if the content is "phrasing content". |
| public Content | Returns: the plain text of this content with HTML tags removedReturns the plain text of this content with HTML tags removed. |
| public String | Returns: string representation of the contentOverrides java. Returns a string representation of the content. |
| public abstract boolean | Returns: whether the writer has just written a newlinethe writer writer, String the newline sequence to use newline, boolean whether the writer has just written a newline atNewline)Writes content to a writer, using a given newline sequence, which should be
either |
| Content | back to summary |
|---|---|
| public Content() | |
| add | back to summary |
|---|---|
| public Content add(Content content) Adds content to the existing content. This is an optional operation. Implementation Specification This implementation throws UnsupportedOperationException.
| |
| add | back to summary |
|---|---|
| public Content add(CharSequence stringContent) Adds a string content to the existing content. This is an optional operation. Implementation Specification This implementation throws UnsupportedOperationException.
| |
| addAll | back to summary |
|---|---|
| public <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. Implementation Specification This implementation delegates to
| |
| charCount | back to summary |
|---|---|
| public int charCount() Returns the number of characters of plain text content in this object.
| |
| isDiscardable | back to summary |
|---|---|
| public boolean isDiscardable() Returns true if this content does not affect the output and can be discarded. The default implementation considers empty content as discardable.
| |
| isEmpty | back to summary |
|---|---|
| public abstract boolean isEmpty() Returns true if the content is empty.
| |
| isPhrasingContent | back to summary |
|---|---|
| public boolean isPhrasingContent() 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.
| |
| stripTags | back to summary |
|---|---|
| public Content stripTags() Returns the plain text of this content with HTML tags removed.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of the content.
Newlines are represented by | |
| write | back to summary |
|---|---|
| public abstract boolean write(Writer writer, String newline, boolean atNewline) throws IOException Writes content to a writer, using a given newline sequence, which should be
either
| |