Class SectionBlock

  • All Implemented Interfaces:
    Block

    public class SectionBlock
    extends Object
    Block that represents a section
    Author:
    Juan F. Codagnone
    • Constructor Detail

      • SectionBlock

        public SectionBlock​(String title,
                            int level,
                            Block[] blocks)
        Creates the SectionBlock.
        Parameters:
        title - the section title, cannot be null
        level - the section level: 0 < level < 6
        blocks - child blocks, cannot be null
    • Method Detail

      • getLevel

        public final int getLevel()
        Returns the level.
        Returns:
        int with the level.
      • getTitle

        public final String getTitle()
        Returns the title.
        Returns:
        String with the title.
      • traverse

        public final void traverse​(Sink sink)
        Traverse the block
        Specified by:
        traverse in interface Block
        Parameters:
        sink - the sink that travers
      • getBlocks

        public final Block[] getBlocks()
        Returns the childBlocks.
        Returns:
        Block[] with the childBlocks.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
        Returns:
        a int.