Interface ICompositeElement

All Superinterfaces:
IElement, Serializable
All Known Subinterfaces:
IContainer, IContentItem, IDocument, IPage
All Known Implementing Classes:
AnsweredContainer, ButtonContainer, CompositeElement, Container, ContainerDelegate, ContentItem, Document, FailedElement, Page, QuestionsContainer, SolutionsContainer, Table, TableCell, TableContainer, TableElement, TableHeader, TableRow, TreeListContainer

public interface ICompositeElement extends IElement
Interface for runtime composite elements. Elements that wish to contain other elements (composite) should implement this interface.
Since:
7.0
Author:
Jon van Leuven, O. Kerpershoek
  • Method Details

    • getContentStyle

      ContentStyle getContentStyle()
      This method returns the content style of the element.
      Returns:
      The content style of the element (never null).
    • getElementCount

      int getElementCount()
      This method returns the number of elements that is contained in this container.
      Returns:
      The number of child elements of this container.
    • getElement

      IElement getElement(int index)
      This method returns the child element at the specified position.
      Parameters:
      index - The position of the child element that is requested.
      Returns:
      The child element at the specified position.
    • getElement

      IElement getElement(RuntimeKey key)
      This method returns the element for the specified runtime key.
      Parameters:
      key - The runtime key of the element that is requested.
      Returns:
      The element for the specified runtime key.
      Throws:
      UnknownKeyException - This exception is thrown when no element is known for the supplied key.
    • getElements

      IElement[] getElements()
      This method returns an array containing all the elements that are directly included in this container.
      Returns:
      Array with the direct sub elements of the container.
    • equalsContent

      boolean equalsContent(ICompositeElement other)
      Method indicating if the composite element has the same content as another composite element.
      Parameters:
      other - composite element to compare with
      Returns:
      boolean indicating if the content of this composite element is equal to the content of the provided composite element.
    • accept

      IVisitor accept(IVisitor visitor)
      Description copied from interface: IElement
      This method will traverse the element structure and invoke the visitor for each element.
      Specified by:
      accept in interface IElement
      Parameters:
      visitor - The visitor that should be used to traverse the structure with.
      Returns:
      The visitor that should be used to process child element, or null when the child elements should not be processed.