CSVGenerator (gCube Species Discovery 3.3.0-SNAPSHOT API)
Date: 2013-07-19

org.gcube.portlets.user.speciesdiscovery.server.stream

## Class CSVGenerator<I>

- java.lang.Object
- - org.gcube.portlets.user.speciesdiscovery.server.stream.CSVGenerator<I>

- All Implemented Interfaces:
    Closeable, AutoCloseable, Iterator<List<String>>, CloseableIterator<List<String>>

      public class CSVGenerator<I>
      extends Object
      implements CloseableIterator<List<String>>

  Utility class for convert an input into a different kind of output.
  Author:
    "Federico De Faveri defaveri@isti.cnr.it"

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Converter<I,List<String>>` | `converter`
    `protected List<String>` | `header`
    `protected org.apache.log4j.Logger` | `logger`
    `protected CloseableIterator<I>` | `source`
    `protected boolean` | `writerHeader`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CSVGenerator(CloseableIterator<I> source, Converter<I,List<String>> converter, List<String> header)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `boolean` | `hasNext()`
    `List<String>` | `next()`
    `void` | `remove()`

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### logger

          protected org.apache.log4j.Logger logger

    - #### source

          protected CloseableIterator<I> source

    - #### converter

          protected Converter<I,List<String>> converter

    - #### header

          protected List<String> header

    - #### writerHeader

          protected boolean writerHeader

  - ### Constructor Detail

    - #### CSVGenerator

          public CSVGenerator(CloseableIterator<I> source,
                      Converter<I,List<String>> converter,
                      List<String> header)

  - ### Method Detail

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `Iterator<List<String>>`

    - #### next

          public List<String> next()

      Specified by:
        `next` in interface `Iterator<List<String>>`

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `IOException`

    - #### remove

          public void remove()

      Specified by:
        `remove` in interface `Iterator<List<String>>`

Copyright © 2013. All Rights Reserved.