Class ArticleIterator

  • All Implemented Interfaces:
    java.lang.Iterable<Article>, java.util.Iterator<Article>

    final class ArticleIterator
    extends java.lang.Object
    implements java.util.Iterator<Article>, java.lang.Iterable<Article>
    Class which wraps an Iterable<String> of raw article information to generate an Iterable<Article> of the parsed information.
    Since:
    3.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Iterator<java.lang.String> stringIterator  
    • Constructor Summary

      Constructors 
      Constructor Description
      ArticleIterator​(java.lang.Iterable<java.lang.String> iterableString)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      java.util.Iterator<Article> iterator()  
      Article next()
      Gets the next Article
      void remove()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Field Detail

      • stringIterator

        private final java.util.Iterator<java.lang.String> stringIterator
    • Constructor Detail

      • ArticleIterator

        public ArticleIterator​(java.lang.Iterable<java.lang.String> iterableString)
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<Article>
      • iterator

        public java.util.Iterator<Article> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<Article>
      • next

        public Article next()
        Gets the next Article
        Specified by:
        next in interface java.util.Iterator<Article>
        Returns:
        the next Article, never null, if unparseable then isDummy() will be true, and the subject will contain the raw info.
      • remove

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