public class CSVDataSourceBuilder extends java.lang.Object implements org.apache.commons.lang3.builder.Builder<DataSource>
Constructor and Description |
---|
CSVDataSourceBuilder() |
CSVDataSourceBuilder(java.io.File file) |
CSVDataSourceBuilder(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
CSVDataSource |
build()
Build the data source.
|
java.lang.String |
getDelimiter()
Get the input delimiter.
|
PreferenceDomain |
getDomain() |
java.io.File |
getFile()
Get the input file.
|
java.lang.String |
getName() |
CSVDataSourceBuilder |
setCache(boolean on)
Deprecated.
|
CSVDataSourceBuilder |
setDelimiter(java.lang.String delim)
Set the input field delimiter.
|
CSVDataSourceBuilder |
setDomain(PreferenceDomain dom)
Set the preference domain for the data source.
|
CSVDataSourceBuilder |
setFile(java.io.File file)
Set the input file.
|
CSVDataSourceBuilder |
setFile(java.lang.String fn)
Set the input file by name.
|
CSVDataSourceBuilder |
setName(java.lang.String n)
Set the data source name.
|
public CSVDataSourceBuilder()
public CSVDataSourceBuilder(java.lang.String name)
public CSVDataSourceBuilder(java.io.File file)
public CSVDataSourceBuilder setName(java.lang.String n)
n
- The name of the data source.setFile(File)
@Nonnull public java.lang.String getName()
public java.io.File getFile()
public CSVDataSourceBuilder setFile(java.io.File file)
setName(String)
) is used
as the file name.file
- The file to read ratings from.public CSVDataSourceBuilder setFile(java.lang.String fn)
fn
- The input file name.public java.lang.String getDelimiter()
public CSVDataSourceBuilder setDelimiter(java.lang.String delim)
delim
- The input delimiter.@Deprecated public CSVDataSourceBuilder setCache(boolean on)
on
- false
to disable caching.public PreferenceDomain getDomain()
public CSVDataSourceBuilder setDomain(PreferenceDomain dom)
dom
- The preference domain.public CSVDataSource build()
setName(String)
or
setFile(File)
must be called prior to building.build
in interface org.apache.commons.lang3.builder.Builder<DataSource>