Interface XMLContentWriter<C>

    • Method Detail

      • isEmpty

        boolean isEmpty​(C content)
        Indicates whether the specified content is empty.
      • map

        default <T> XMLContentWriter<T> map​(Function<T,​C> mapper)
        Returns a new writer whose content is mapped from the specified function.
        Type Parameters:
        T - the mapped content type
        Parameters:
        mapper - a content mapping function
        Returns:
        a new writer whose content is mapped from the specified function.
      • andThen

        default XMLContentWriter<C> andThen​(XMLContentWriter<C> after)
        Returns a new writer that invokes XMLElementWriter.writeContent(XMLExtendedStreamWriter, Object) on the specified writer after invoking XMLElementWriter.writeContent(XMLExtendedStreamWriter, Object) on this writer.
        Parameters:
        writer - a content writer
        Returns:
        a new content writer combining this writer with the specified writer
      • compose

        default XMLContentWriter<C> compose​(XMLContentWriter<C> before)
        Returns a new writer that invokes XMLElementWriter.writeContent(XMLExtendedStreamWriter, Object) on the specified writer before invoking XMLElementWriter.writeContent(XMLExtendedStreamWriter, Object) on this writer.
        Parameters:
        writer - a content writer
        Returns:
        a new content writer combining this writer with the specified writer
      • empty

        static <C> XMLContentWriter<C> empty()
        Returns an empty content writer.
        Type Parameters:
        C - the writer context.
        Returns:
        an empty content writer.