T
- the record typepublic static class RecordDefinition.Builder<T> extends Object
RecordDefinition
.Constructor and Description |
---|
Builder(Class<? extends T> dataType)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
RecordDefinition<T> |
build()
Builds a
RecordDefinition . |
<S> RecordDefinition.Builder<T> |
withField(Function<? super T,? extends S> extractor,
FieldDefinition<S> definition)
Adds a field.
|
RecordDefinition.Builder<T> |
withHeaderType(HeaderType newValue)
Sets the header type.
|
RecordDefinition.Builder<T> |
withOnLessInput(ErrorAction newValue)
Sets the error action for record only has less input fields.
|
RecordDefinition.Builder<T> |
withOnMalformedInput(ErrorAction newValue)
Sets the error action for malformed inputs.
|
RecordDefinition.Builder<T> |
withOnMoreInput(ErrorAction newValue)
Sets the error action for record has extra input fields.
|
RecordDefinition.Builder<T> |
withOnUnmappableOutput(ErrorAction newValue)
Sets the error action for un-mappable outputs.
|
RecordDefinition.Builder<T> |
withSkipEmptyInput(boolean newValue)
Sets whether or not this skips empty inputs.
|
RecordDefinition.Builder<T> |
withTrimInput(boolean newValue)
Sets whether or not leading/trailing white-space characters are trimmed.
|
public <S> RecordDefinition.Builder<T> withField(Function<? super T,? extends S> extractor, FieldDefinition<S> definition)
S
- the property typeextractor
- the property extractordefinition
- the field definitionpublic RecordDefinition.Builder<T> withHeaderType(HeaderType newValue)
newValue
- the header typepublic RecordDefinition.Builder<T> withTrimInput(boolean newValue)
newValue
- true
to enable, or false
to disablepublic RecordDefinition.Builder<T> withSkipEmptyInput(boolean newValue)
newValue
- true
to enable, or false
to disablepublic RecordDefinition.Builder<T> withOnMalformedInput(ErrorAction newValue)
newValue
- the error actionpublic RecordDefinition.Builder<T> withOnUnmappableOutput(ErrorAction newValue)
newValue
- the error actionpublic RecordDefinition.Builder<T> withOnLessInput(ErrorAction newValue)
newValue
- the error actionpublic RecordDefinition.Builder<T> withOnMoreInput(ErrorAction newValue)
newValue
- the error actionpublic RecordDefinition<T> build()
RecordDefinition
.Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.