T
- the record typepublic final class RecordDefinition<T> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RecordDefinition.Builder<T>
A builder of
RecordDefinition . |
Modifier and Type | Method and Description |
---|---|
static <T> RecordDefinition.Builder<T> |
builder(Class<T> dataType)
Returns a new builder.
|
int |
getNumberOfFields()
Returns the number of fields in this record.
|
TextInput<T> |
newInput(FieldReader reader,
String path)
Creates a new
TextInput from this definition with default options. |
TextInput<T> |
newInput(FieldReader reader,
String path,
Collection<? extends InputOption> options)
Creates a new
TextInput from this definition. |
TextOutput<T> |
newOutput(FieldWriter writer,
String path)
Creates a new
TextOutput from this definition. |
TextOutput<T> |
newOutput(FieldWriter writer,
String path,
Collection<? extends OutputOption> options)
Creates a new
TextOutput from this definition. |
public static <T> RecordDefinition.Builder<T> builder(Class<T> dataType)
T
- the data typedataType
- the data typepublic int getNumberOfFields()
public TextInput<T> newInput(FieldReader reader, String path)
TextInput
from this definition with default options.reader
- the formatted text readerpath
- the text file pathpublic TextInput<T> newInput(FieldReader reader, String path, Collection<? extends InputOption> options)
TextInput
from this definition.reader
- the formatted text readerpath
- the text file pathoptions
- the input optionspublic TextOutput<T> newOutput(FieldWriter writer, String path)
TextOutput
from this definition.writer
- the formatted text writerpath
- the text file pathpublic TextOutput<T> newOutput(FieldWriter writer, String path, Collection<? extends OutputOption> options)
TextOutput
from this definition.writer
- the formatted text writerpath
- the text file pathoptions
- the output optionsCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.