Class ListBlockParser

  • All Implemented Interfaces:
    BlockParser

    public class ListBlockParser
    extends java.lang.Object
    implements BlockParser

    ListBlockParser class.

    Version:
    $Id$
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int BULLETED_LIST
      Constant BULLETED_LIST=0
      static int NUMBERED_LIST
      Constant NUMBERED_LIST=1
    • Constructor Summary

      Constructors 
      Constructor Description
      ListBlockParser()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accept​(java.lang.String line, ByLineSource source)
      accept.
      private void addItem​(TreeListBuilder treeListBuilder, java.lang.StringBuilder text)  
      private int getLevel​(java.lang.String line)  
      private boolean isBulletedList​(java.lang.String line, int deph)  
      private boolean isList​(java.lang.String line)  
      Block visit​(java.lang.String line, ByLineSource source)
      visit.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • BULLETED_LIST

        public static final int BULLETED_LIST
        Constant BULLETED_LIST=0
        See Also:
        Constant Field Values
      • NUMBERED_LIST

        public static final int NUMBERED_LIST
        Constant NUMBERED_LIST=1
        See Also:
        Constant Field Values
    • Constructor Detail

      • ListBlockParser

        public ListBlockParser()
    • Method Detail

      • accept

        public boolean accept​(java.lang.String line,
                              ByLineSource source)
        accept.
        Specified by:
        accept in interface BlockParser
        Parameters:
        line - the line.
        source - the source.
        Returns:
        boolean true if valid.
      • addItem

        private void addItem​(TreeListBuilder treeListBuilder,
                             java.lang.StringBuilder text)
      • getLevel

        private int getLevel​(java.lang.String line)
      • isBulletedList

        private boolean isBulletedList​(java.lang.String line,
                                       int deph)
      • isList

        private boolean isList​(java.lang.String line)