| Modifier and Type | Field and Description |
|---|---|
protected com.google.common.collect.ImmutableSet.Builder<ExportableColumn<O,?>> |
columnsBuilder |
protected ExporterConfiguration<O> |
configuration |
static String |
DEFAULT_CELL_SEPARATOR |
static Charset |
DEFAULT_CHARSET |
static String |
DEFAULT_END_OF_LINE_SEPARATOR |
| Constructor and Description |
|---|
ExporterBuilder() |
ExporterBuilder(ExporterConfiguration<O> configuration) |
| Modifier and Type | Method and Description |
|---|---|
ExporterBuilder<O> |
addColumn(String propertyName)
Add a new column for the given property name, using also the property name as the export header name.
|
ExporterBuilder<O> |
addColumn(String headerName,
String propertyName)
Add a new column for the given property name and export as the given header name.
|
<T> ExporterBuilder<O> |
addColumn(String headerName,
String propertyName,
ValueFormatter<T> valueFormatter)
Add a new column for the given property name and export as the given header name.
|
ExporterBuilder<O> |
addColumn(String headerName,
ValueGetter<O,String> valueGetter)
Add a new column for the given property name and export as the given header name.
|
<T> ExporterBuilder<O> |
addColumn(String headerName,
ValueGetter<O,T> valueGetter,
ValueFormatter<T> valueFormatter)
Add a new column for the given property name and exported as the given header name.
|
ExporterBuilder<O> |
addColumns(Iterable<ExportableColumn<O,Object>> columns)
Add the given columns.
|
Exporter<O> |
build() |
ExporterBuilder<O> |
setCellSeparator(String cellSeparator)
Set the
ExporterConfiguration.cellSeparator and return the builder. |
ExporterBuilder<O> |
setCharset(Charset charset)
Set the
ExporterConfiguration.charset and return the builder. |
ExporterBuilder<O> |
setEndOfLineSeparator(String endOfLineSeparator)
Set the
ExporterConfiguration.endOfLineSeparator and return the builder. |
public static final String DEFAULT_CELL_SEPARATOR
public static final String DEFAULT_END_OF_LINE_SEPARATOR
public static final Charset DEFAULT_CHARSET
protected final ExporterConfiguration<O> configuration
protected final com.google.common.collect.ImmutableSet.Builder<ExportableColumn<O,?>> columnsBuilder
public ExporterBuilder()
public ExporterBuilder(ExporterConfiguration<O> configuration)
public ExporterBuilder<O> setCellSeparator(String cellSeparator)
ExporterConfiguration.cellSeparator and return the builder.cellSeparator - new value for ExporterConfiguration.cellSeparator.public ExporterBuilder<O> setEndOfLineSeparator(String endOfLineSeparator)
ExporterConfiguration.endOfLineSeparator and return the builder.endOfLineSeparator - new value for ExporterConfiguration.endOfLineSeparator.public ExporterBuilder<O> setCharset(Charset charset)
ExporterConfiguration.charset and return the builder.charset - new value for ExporterConfiguration.charset.public ExporterBuilder<O> addColumns(Iterable<ExportableColumn<O,Object>> columns)
columns - columns to add to the builderpublic ExporterBuilder<O> addColumn(String propertyName)
propertyName - the property name to exportpublic ExporterBuilder<O> addColumn(String headerName, String propertyName)
headerName - the header name to use in exportpropertyName - the property name to exportpublic ExporterBuilder<O> addColumn(String headerName, ValueGetter<O,String> valueGetter)
headerName - the header name to use in exportvalueGetter - the value getterpublic <T> ExporterBuilder<O> addColumn(String headerName, String propertyName, ValueFormatter<T> valueFormatter)
headerName - the header name to use in exportpropertyName - the property name to exportvalueFormatter - the value formatterpublic <T> ExporterBuilder<O> addColumn(String headerName, ValueGetter<O,T> valueGetter, ValueFormatter<T> valueFormatter)
headerName - the header name to use in exportvalueGetter - the value gettervalueFormatter - the value formatterCopyright © 2013–2016 CodeLutin. All rights reserved.