olg.csv.base
Class IgnoreNullReader

java.lang.Object
  extended by olg.csv.base.IgnoreNullReader
All Implemented Interfaces:
Closeable, Iterator<Row>, IReader

public class IgnoreNullReader
extends Object
implements IReader

A "Proxy" reader which Provides a mecanism to skip empty row.

Author:
Olivier Godineau

Constructor Summary
IgnoreNullReader(IReader reader)
           
 
Method Summary
 void close()
          close the original reader.
 boolean hasNext()
           
 boolean isWithHeaders()
          Indicates if the file has a headers line.
 Row next()
           
 void remove()
          Throws UnsupportedOperationException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IgnoreNullReader

public IgnoreNullReader(IReader reader)
Parameters:
reader - a concret reader
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<Row>
Returns:
true if exists a next not empty row.

next

public Row next()
Specified by:
next in interface Iterator<Row>
Returns:
the next not empty row.

remove

public void remove()
Throws UnsupportedOperationException.

Specified by:
remove in interface Iterator<Row>

close

public void close()
close the original reader.

Specified by:
close in interface Closeable

isWithHeaders

public boolean isWithHeaders()
Description copied from interface: IReader
Indicates if the file has a headers line.

Specified by:
isWithHeaders in interface IReader
Returns:
the original withHeaders attribute.


Copyright © 2014. All rights reserved.