Additional top-level class in compilation unit: AbstractConversionMapping.
Conversion objects
| Modifier and Type | Field and Description |
|---|---|
| private Map | conversionsByIndex
This is the final sequence of conversions applied to each index in a record. |
| private List | conversionSequence
This list contains the sequence of conversions applied to sets of fields over multiple calls. |
| private AbstractConversionMapping | |
| private static final Conversion | |
| private AbstractConversionMapping | |
| private AbstractConversionMapping | |
| private AbstractConversionMapping | |
| public int[] | |
| private Map |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | Returns: the Object produced by a sequence of conversions against the original String value.The index of parsed value in a record index, String The parsed value in a record stringValue, boolean[] an array of flags that indicate whether a conversion occurred. Used to determine whether
or not a default conversion by type (specified with convertedFlags)ConversionProcessor#convertType(Class, Conversion[])) should be applied.Applies a sequence of conversions associated with a String value parsed from a given index. |
| public void | applyConversionsOnAllFields(Conversion<String, ?>...
the sequence of conversions to be applied conversions)Applies a sequence of conversions on all fields. |
| public FieldSet | Returns: a selector of enumerations.the sequence of conversions to be applied conversions)Applies a sequence of conversions on a selection of enumerations that represent fields |
| public FieldSet | Returns: a selector of column indexes.the sequence of conversions to be applied conversions)Applies a sequence of conversions on a selection of field indexes |
| public FieldSet | Returns: a selector of column names.the sequence of conversions to be applied conversions)Applies a sequence of conversions on a selection of field name |
| public FieldConversionMapping | |
| public void | executeValidations(int
The index of parsed value in a record index, Object The value of the record at the given index value)Applies any validations associated with a field at a given index in a record |
| public Conversion | Returns: the sequence of conversions to be applied at a given column indexthe index of the column where the conversions should be executed index, Class<?> the type resulting from the conversion sequence. expectedType)Returns the sequence of conversions to be applied at a given column index |
| public void | prepareExecution(boolean
flag indicating whether a writing process is being initialized. writing, String[] The field sequence that identifies how records will be organized.
values)This is generally the sequence of headers in a record, but it might be just the first parsed row from a given input (as field selection by index is allowed). Prepares the conversions registered in this object to be executed against a given sequence of fields |
| public Object | Returns: the Object resulting from a sequence of conversions against the original value.flag to indicate whether or not the conversion sequence must be executed in reverse order executeInReverseOrder, int The index of parsed value in a record index, Object The value in a record value, boolean[] an array of flags that indicate whether a conversion occurred. Used to determine whether
or not a default conversion by type (specified with convertedFlags)ConversionProcessor#convertType(Class, Conversion[])) should be applied.Applies a sequence of conversions associated with an Object value at a given index in a record. |
| conversionsByIndex | back to summary |
|---|---|
| private Map<Integer, List<Conversion<?, ?>>> conversionsByIndex This is the final sequence of conversions applied to each index in a record. It is populated when | |
| conversionSequence | back to summary |
|---|---|
| private List<FieldSelector> conversionSequence This list contains the sequence of conversions applied to sets of fields over multiple calls. It is shared by Every time the user associates a sequence of conversions to a field, conversionSequence list will receive the FieldSelector. | |
| convertAllMapping | back to summary |
|---|---|
| private AbstractConversionMapping<Integer> convertAllMapping | |
| EMPTY_CONVERSION_ARRAY | back to summary |
|---|---|
private static final Conversion<I, O>[] EMPTY_CONVERSION_ARRAY
| |
| fieldEnumConversionMapping | back to summary |
|---|---|
private AbstractConversionMapping<Enum<E extends Enum<E>>> fieldEnumConversionMapping
| |
| fieldIndexConversionMapping | back to summary |
|---|---|
| private AbstractConversionMapping<Integer> fieldIndexConversionMapping | |
| fieldNameConversionMapping | back to summary |
|---|---|
| private AbstractConversionMapping<String> fieldNameConversionMapping | |
| validatedIndexes | back to summary |
|---|---|
| public int[] validatedIndexes | |
| validationsByIndex | back to summary |
|---|---|
| private Map<Integer, List<ValidatedConversion>> validationsByIndex | |
| FieldConversionMapping | back to summary |
|---|---|
| public FieldConversionMapping() | |
| applyConversions | back to summary |
|---|---|
| public Object applyConversions(int index, String stringValue, boolean[] convertedFlags) Applies a sequence of conversions associated with a String value parsed from a given index.
| |
| applyConversionsOnAllFields | back to summary |
|---|---|
| public void applyConversionsOnAllFields(Conversion<String, ?>... conversions) Applies a sequence of conversions on all fields.
| |
| applyConversionsOnFieldEnums | back to summary |
|---|---|
| public FieldSet Applies a sequence of conversions on a selection of enumerations that represent fields
| |
| applyConversionsOnFieldIndexes | back to summary |
|---|---|
| public FieldSet Applies a sequence of conversions on a selection of field indexes
| |
| applyConversionsOnFieldNames | back to summary |
|---|---|
| public FieldSet Applies a sequence of conversions on a selection of field name
| |
| clone | back to summary |
|---|---|
| public FieldConversionMapping clone() Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| executeValidations | back to summary |
|---|---|
| public void executeValidations(int index, Object value) Applies any validations associated with a field at a given index in a record
| |
| getConversions | back to summary |
|---|---|
| public Conversion Returns the sequence of conversions to be applied at a given column index
| |
| prepareExecution | back to summary |
|---|---|
| public void prepareExecution(boolean writing, String[] values) Prepares the conversions registered in this object to be executed against a given sequence of fields
| |
| reverseConversions | back to summary |
|---|---|
| public Object reverseConversions(boolean executeInReverseOrder, int index, Object value, boolean[] convertedFlags) Applies a sequence of conversions associated with an Object value at a given index in a record.
| |