APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.javadoc.internal.html

public Class ContentBuilder

extends Content
Class Inheritance
Imports
java.io.IOException, .Writer, java.util.ArrayList, .List, .Objects

A sequence of Content nodes.

Field Summary

Modifier and TypeField and Description
protected List<Content>

Constructor Summary

AccessConstructor and Description
public
public
ContentBuilder(Content... contents)

Method Summary

Modifier and TypeMethod and Description
public ContentBuilder
add(Content content)

Overrides jdk.javadoc.internal.html.Content.add.

Adds content to the existing content.

public ContentBuilder
add(CharSequence text)

Overrides jdk.javadoc.internal.html.Content.add.

Adds a string content to the existing content.

public int
charCount()

Overrides jdk.javadoc.internal.html.Content.charCount.

Returns the number of characters of plain text content in this object.

private void
public List<Content>

Returns:

the contents of this builder
getContents
()

Returns the contents of this builder.

public boolean
isEmpty()

Implements abstract jdk.javadoc.internal.html.Content.isEmpty.

Returns true if the content is empty.

public boolean
isPhrasingContent()

Overrides jdk.javadoc.internal.html.Content.isPhrasingContent.

Returns true if the content is "phrasing content".

public Content
stripTags()

Overrides jdk.javadoc.internal.html.Content.stripTags.

Returns the plain text of this content with HTML tags removed.

public boolean
write(Writer writer, String newline, boolean atNewline)

Implements abstract jdk.javadoc.internal.html.Content.write.

Writes content to a writer, using a given newline sequence, which should be either \n or the platform line separator.

Inherited from jdk.javadoc.internal.html.Content:
addAllisDiscardabletoString

Field Detail

contentsback to summary
protected List<Content> contents

Constructor Detail

ContentBuilderback to summary
public ContentBuilder()
ContentBuilderback to summary
public ContentBuilder(Content... contents)

Method Detail

addback to summary
public ContentBuilder add(Content content)

Overrides jdk.javadoc.internal.html.Content.add.

Doc from jdk.javadoc.internal.html.Content.add.

Adds content to the existing content. This is an optional operation.

Annotations
@Override
addback to summary
public ContentBuilder add(CharSequence text)

Overrides jdk.javadoc.internal.html.Content.add.

Doc from jdk.javadoc.internal.html.Content.add.

Adds a string content to the existing content. This is an optional operation.

Annotations
@Override
charCountback to summary
public int charCount()

Overrides jdk.javadoc.internal.html.Content.charCount.

Doc from jdk.javadoc.internal.html.Content.charCount.

Returns the number of characters of plain text content in this object.

Annotations
@Override
ensureMutableContentsback to summary
private void ensureMutableContents()
getContentsback to summary
public List<Content> getContents()

Returns the contents of this builder.

Returns:List<Content>

the contents of this builder

isEmptyback to summary
public boolean isEmpty()

Implements abstract jdk.javadoc.internal.html.Content.isEmpty.

Doc from jdk.javadoc.internal.html.Content.isEmpty.

Returns true if the content is empty.

Annotations
@Override
isPhrasingContentback to summary
public boolean isPhrasingContent()

Overrides jdk.javadoc.internal.html.Content.isPhrasingContent.

Doc from jdk.javadoc.internal.html.Content.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.

Annotations
@Override
stripTagsback to summary
public Content stripTags()

Overrides jdk.javadoc.internal.html.Content.stripTags.

Doc from jdk.javadoc.internal.html.Content.stripTags.

Returns the plain text of this content with HTML tags removed.

Annotations
@Override
writeback to summary
public boolean write(Writer writer, String newline, boolean atNewline) throws IOException

Implements abstract jdk.javadoc.internal.html.Content.write.

Doc from jdk.javadoc.internal.html.Content.write.

Writes content to a writer, using a given newline sequence, which should be either \n or the platform line separator.

Annotations
@Override
Exceptions
IOException:
if an error occurs while writing the output