Interface Appendable<T extends Element<T>>

Type Parameters:
T - parent element type
All Known Subinterfaces:
DocumentWriter<T>
All Known Implementing Classes:
Attachments, ChildElement, ClasspathResourceSource, ClassSource, CpuCores, Data, DirectorySource, Element, Event, Events, FileEncoding, FilePosition, FileSource, Finished, HeapSize, HostName, Infrastructure, JavaVersion, Metadata, MethodSource, OperatingSystem, PackageSource, Reason, Reported, Result, Sources, Started, Tag, Tags, Throwable, UriSource, UserName

public interface Appendable<T extends Element<T>>
Interface for objects that support appending child elements.
  • Method Details

    • append

      default <C extends ChildElement<T, ? super C>> Appendable<T> append(Factory<C> creator)
      Append the child element created by the supplied factory.
      Type Parameters:
      C - child element type
      Parameters:
      creator - child element factory
      Returns:
      self reference to allow method chaining
    • append

      <C extends ChildElement<T, ? super C>> Appendable<T> append(Factory<C> creator, Consumer<? super C> configurer)
      Append the child element created by the supplied factory configured by the supplied consumer.
      Type Parameters:
      C - child element type
      Parameters:
      creator - child element factory
      configurer - child element configurer
      Returns:
      self reference to allow method chaining