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
-
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 interfacejava.lang.Iterable<java.lang.String>
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
close
public void close() throws java.io.IOException- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-