T
- the property typepublic static class FieldDefinition.Builder<T> extends Object
FieldDefinition
.Constructor and Description |
---|
Builder(String name,
Supplier<? extends FieldAdapter<? super T>> adapterSupplier)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
FieldDefinition<T> |
build()
Builds a
FieldDefinition . |
FieldDefinition.Builder<T> |
withOnMalformedInput(ErrorAction newValue)
Sets the error action for malformed inputs.
|
FieldDefinition.Builder<T> |
withOnUnmappableOutput(ErrorAction newValue)
Sets the error action for un-mappable outputs.
|
FieldDefinition.Builder<T> |
withOutputOption(FieldOutput.Option newValue)
Adds an output option.
|
FieldDefinition.Builder<T> |
withOutputOptions(FieldOutput.Option... newValues)
Adds output options.
|
FieldDefinition.Builder<T> |
withSkipEmptyInput(Boolean newValue)
Sets whether or not this skips empty inputs.
|
FieldDefinition.Builder<T> |
withTrimInput(Boolean newValue)
Sets whether or not leading/trailing white-space characters are trimmed.
|
public Builder(String name, Supplier<? extends FieldAdapter<? super T>> adapterSupplier)
name
- the field nameadapterSupplier
- the adapter supplierpublic FieldDefinition.Builder<T> withTrimInput(Boolean newValue)
newValue
- true
to enable, false
to disable, or null
to inherit the parentpublic FieldDefinition.Builder<T> withSkipEmptyInput(Boolean newValue)
newValue
- true
to enable, false
to disable, or null
to inherit the parentpublic FieldDefinition.Builder<T> withOnMalformedInput(ErrorAction newValue)
newValue
- the error action, or null
if inherit the parent settingpublic FieldDefinition.Builder<T> withOnUnmappableOutput(ErrorAction newValue)
newValue
- the error action, or null
if inherit the parent settingpublic FieldDefinition.Builder<T> withOutputOption(FieldOutput.Option newValue)
newValue
- the output optionpublic FieldDefinition.Builder<T> withOutputOptions(FieldOutput.Option... newValues)
newValues
- the output optionspublic FieldDefinition<T> build()
FieldDefinition
.Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.