java.lang.Object
ch.tocco.nice2.optional.cms.impl.publish.output.freemarker.postprocessing.Document

public class Document extends Object
Represents an HTML document. This document is immutable. All writing methods return a new instance.
  • Constructor Details

    • Document

      public Document(String content)
  • Method Details

    • headElement

      public Optional<HeadElement> headElement()
      Get the head element of this document.
      Returns:
      the found head element.
    • headElement

      public Document headElement(HeadElement headElement)
      Returns a new document with the new head element.
      Parameters:
      headElement - the head element to set.
      Returns:
      a new document with the new head element.
      Throws:
      DocumentException - if the head element could not be set.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object