# Class CsvReader<T>

java.lang.Object
gaia.cu9.tools.parallax.readers.CsvReader<T>

Direct Known Subclasses:
  `StarVariablesCsvReader`

public abstract class CsvReader<T> extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`protected long`
`currentEntryNumber`
`protected Logger`
`logger`
`protected String`
`path`
`protected BufferedReader`
`reader`
`protected CsvSchema<T>`
`schema`

## Constructor Summary

Constructors
Constructor
Description
`CsvReader(CsvSchema<T> schema)`

## Method Summary

Modifier and Type
Method
Description
`protected abstract T`
`buildObject(long entryNumber, List<String> tokens)`
`void`
`close()`
`protected double`
`getDouble(String key, List<String> values, double defaultValue)`
`protected long`
`getLong(String key, List<String> values, long defaultValue)`
`void`
`load(String path)`
`T`
`next()`
`protected T`
`processLine(String line)`
`List<T>`
`readAll(String inputPath)`

### Methods inherited from class Object

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

## Field Details

### schema

protected CsvSchema<T> schema

### currentEntryNumber

protected long currentEntryNumber

### logger

protected Logger logger

### path

protected String path

### reader

protected BufferedReader reader

## Constructor Details

### CsvReader

public CsvReader(CsvSchema<T> schema)

## Method Details

### load

public void load(String path) throws IOException

Throws:
  `IOException`

### next

public T next() throws IOException

Throws:
  `IOException`

### close

public void close()

### readAll

public List<T> readAll(String inputPath)

### processLine

protected T processLine(String line)

### buildObject

protected abstract T buildObject(long entryNumber, List<String> tokens)

### getDouble

protected double getDouble(String key, List<String> values, double defaultValue)

### getLong

protected long getLong(String key, List<String> values, long defaultValue)