Package lazyj

Class FileLinesIterable

java.lang.Object
lazyj.FileLinesIterable
All Implemented Interfaces:
java.io.Closeable, java.lang.AutoCloseable, java.lang.Iterable<java.lang.String>

public class FileLinesIterable
extends java.lang.Object
implements java.lang.Iterable<java.lang.String>, java.io.Closeable
Iterable object over the lines in a buffer
Author:
costing
  • Constructor Summary

    Constructors 
    Constructor Description
    FileLinesIterable​(java.io.BufferedReader br)
    Build the iterable over a buffered reader
  • Method Summary

    Modifier and Type Method Description
    void close()  
    protected void finalize()  
    java.util.Iterator<java.lang.String> iterator()  

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Constructor Details

    • FileLinesIterable

      public FileLinesIterable​(java.io.BufferedReader br)
      Build the iterable over a buffered reader
      Parameters:
      br - the buffer
  • Method Details

    • iterator

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

      protected void finalize() throws java.lang.Throwable
      Overrides:
      finalize in class java.lang.Object
      Throws:
      java.lang.Throwable
    • close

      public void close() throws java.io.IOException
      Specified by:
      close in interface java.lang.AutoCloseable
      Specified by:
      close in interface java.io.Closeable
      Throws:
      java.io.IOException