Class LineSequence

  • All Implemented Interfaces:
    Sequence<java.lang.String>, java.lang.Iterable<java.lang.String>

    class LineSequence
    extends java.lang.Object
    implements Sequence<java.lang.String>
    Cast reader into a sequence of text lines in file.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.BufferedReader reader  
    • Constructor Summary

      Constructors 
      Constructor Description
      LineSequence​(java.io.BufferedReader reader)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int hintSize()  
      java.util.Iterator<java.lang.String> iterator()  
      Collector newCollector​(int size)  
      • 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
    • Field Detail

      • reader

        private final java.io.BufferedReader reader
    • Constructor Detail

      • LineSequence

        public LineSequence​(java.io.BufferedReader reader)
    • Method Detail

      • iterator

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

        public int hintSize()
        Specified by:
        hintSize in interface Sequence<java.lang.String>