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

public class HeadMatcher extends Object
Utility to find the head element in an HTML document.
  • Constructor Details

    • HeadMatcher

      public HeadMatcher(String content)
      Create a new HeadMatcher.
      Parameters:
      content - The HTML document content.
  • Method Details

    • headElement

      public HeadElement headElement()
      Get the found head element.
      Returns:
      the head element.
      Throws:
      IllegalStateException - if the head could not be found.
      See Also:
    • found

      public boolean found()
      Determine whether the head could be found.
      Returns:
      true, if the head could be found, else false.