java.lang.Object
org.jdrupes.mdoclet.internal.doclets.toolkit.Content
Bekannte direkte Unterklassen:
BodyContents, Comment, ContentBuilder, Entity, Head, HtmlTree, RawHtml, Table, TableHeader, Text, TextBuilder

public abstract class Content extends Object
A content tree for javadoc output pages.
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    add(CharSequence stringContent)
    Adds a string content to the existing content.
    add(Content 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
    Returns true if the content is empty.
    Returns a string representation of the content.
    abstract boolean
    write(Writer writer, String newline, boolean atNewline)
    Writes content to a writer, using a given newline sequence, which should be either \n or the platform line separator.

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Konstruktordetails

  • Methodendetails

    • toString

      public String toString()
      Returns a string representation of the content.

      Newlines are represented by \n.

      Setzt außer Kraft:
      toString in Klasse Object
      Gibt zurück:
      string representation of the content
    • add

      public Content add(Content content)
      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 implementation
      IllegalArgumentException - if the content is not suitable to be added
    • add

      public Content add(CharSequence stringContent)
      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 implementation
      IllegalArgumentException - if the content is not suitable to be added
    • addAll

      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.
      Parameter:
      items - the items to be added
      mapper - 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 implementation
      IllegalArgumentException - if the content is not suitable to be added
    • write

      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 \n or the platform line separator.
      Parameter:
      writer - the writer
      newline - the newline sequence to use
      atNewline - 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

      public abstract boolean isEmpty()
      Returns true if the content is empty.
      Gibt zurück:
      true if no content to be displayed else return false
    • isDiscardable

      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.

      Gibt zurück:
      true if this content can be discarded without affecting the output
    • charCount

      public int 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