Class Sequence

    • Constructor Detail

      • Sequence

        public Sequence​(String idPrefix,
                        WhiteSpace whiteSpace,
                        Content... initialItems)
        Initialize as a collection with a few starting items added.
        Parameters:
        idPrefix - an optional id prefix
        whiteSpace - the white space specification
        initialItems - initial items that are added to the end of the collection.
      • Sequence

        public Sequence​(String idPrefix,
                        Content... initialItems)
        Initialize as a collection with a few starting items added.
        Parameters:
        idPrefix - an optional id prefix
        initialItems - initial items that are added to the end of the collection.
      • Sequence

        public Sequence​(Content... initialItems)
        Initialize as a collection with a few starting items added.
        Parameters:
        initialItems - initial items that are added to the end of the collection.
      • Sequence

        public Sequence​(WhiteSpace whiteSpace,
                        Content... initialItems)
        Initialize as a collection with a few starting items added.
        Parameters:
        whiteSpace - the white space specification
        initialItems - initial items that are added to the end of the collection.
    • Method Detail

      • addItem

        public void addItem​(Content item)
        Adds an item to the collection. If the item is excluded by AbstractSequenceContent#excludeGlobally(Content), then the item is not added and ignored.
        Specified by:
        addItem in interface ContentLogger
        Parameters:
        item - to be added
      • clear

        public void clear()
        Discards all items from the collection.
      • size

        public int size()
        Returns:
        number of items in the collection. If the items are complex items by itself, the number of subitems is not counted. The return value simply is the number of direct children of this content node.
      • addItems

        public void addItems​(Collection<? extends Content> items)
        Adds several items to the collection by calling addItem(Content) method.
        Parameters:
        items - to be added
      • renderHtmlImpl

        public void renderHtmlImpl​(StringBuilder sb,
                                   IncludeInfo includeInfo,
                                   RenderContext ctx,
                                   boolean useJavascript)
        appends all comments in the sequence one after the other without any visual marks between the individual items.
        Specified by:
        renderHtmlImpl in class Content
        Parameters:
        sb - HTML code result
        includeInfo - controls, which content to be rendered.
        ctx - render context
        useJavascript - if true, the generated HTML code will contain Javascript
        See Also:
        Content#renderHtmlImpl(StringBuilder, IncludeInfo, RenderContext)