Class MultiLineTextRenderer.WordIteratorHTML

  • All Implemented Interfaces:
    java.util.Iterator<java.lang.String>
    Enclosing class:
    MultiLineTextRenderer

    public static class MultiLineTextRenderer.WordIteratorHTML
    extends java.lang.Object
    implements java.util.Iterator<java.lang.String>
    Iterates through words from an HTML text line. Note that returned 'words' can contain html tags at any place, before, inside or after the word.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int nextWord  
      protected static java.util.regex.Pattern SGMLOrSpacePattern  
      protected java.util.ArrayList<java.lang.String> words  
    • Constructor Summary

      Constructors 
      Constructor Description
      WordIteratorHTML​(java.lang.String text)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addWord​(java.lang.String word)  
      boolean hasNext()  
      java.lang.String next()  
      void remove()  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Field Detail

      • words

        protected java.util.ArrayList<java.lang.String> words
      • nextWord

        protected int nextWord
      • SGMLOrSpacePattern

        protected static java.util.regex.Pattern SGMLOrSpacePattern
    • Constructor Detail

      • WordIteratorHTML

        public WordIteratorHTML​(java.lang.String text)
    • Method Detail

      • addWord

        protected void addWord​(java.lang.String word)
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<java.lang.String>
      • next

        public java.lang.String next()
        Specified by:
        next in interface java.util.Iterator<java.lang.String>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<java.lang.String>