Located in compilation unit of com.
FieldNameSelector, FieldIndexSelector
| Modifier and Type | Field and Description |
|---|---|
| private List | |
| private Map |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public AbstractConversionMapping | |
| public AbstractConversionMapping | clone(Map<FieldSelector, FieldSelector> clonedSelectors, List<FieldSelector> clonedConversionSequence)
|
| public boolean | Returns: true if no conversions were associated with any field; false otherwiseQueries if any conversions were associated with any field |
| protected abstract FieldSelector | Returns: a new FieldSelector instance.Creates a FieldSelector instance of the desired type. |
| public void | prepareExecution(boolean
flag indicating whether a writing process is being initialized. writing, FieldSelector the selected fields for a given conversion sequence. selector, Map<Integer, List<Conversion<?, ?>>> map of all conversions registered to every field index, in the order they were declared conversionsByIndex, 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). Get all indexes in the given selector and adds the conversions defined at that index to the map of conversionsByIndex. |
| public FieldSet | Returns: a FieldSet which provides methods to select the fields that must be converted or null if the FieldSelector returned by #newFieldSelector is not an instance of FieldSet (which is the case ofAllIndexesSelector).the conversion sequence to be applied to a set of fields. conversions)Registers a sequence of conversions to a set of fields. |
| private static void | validateDuplicates(FieldSelector
the selection of fields selector, List<Conversion<?, ?>> the sequence of conversions applied to a given index conversionsAtIndex, Conversion<?, ?>[] the sequence of conversions to add to conversionsAtIndex conversionsToAdd)Ensures an individual field does not have the same conversion object applied to it more than once. |
| conversionSequence | back to summary |
|---|---|
| private List<FieldSelector> conversionSequence | |
| conversionsMap | back to summary |
|---|---|
| private Map<FieldSelector, Conversion<String, ?>[]> conversionsMap | |
| AbstractConversionMapping | back to summary |
|---|---|
| pack-priv AbstractConversionMapping(List<FieldSelector> conversionSequence) | |
| clone | back to summary |
|---|---|
| public AbstractConversionMapping 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
| |
| clone | back to summary |
|---|---|
| public AbstractConversionMapping | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Queries if any conversions were associated with any field
| |
| newFieldSelector | back to summary |
|---|---|
| protected abstract FieldSelector newFieldSelector() Creates a FieldSelector instance of the desired type. Used in @link FieldConversionMapping}.
| |
| prepareExecution | back to summary |
|---|---|
| public void prepareExecution(boolean writing, FieldSelector selector, Map<Integer, List<Conversion<?, ?>>> conversionsByIndex, String[] values) Get all indexes in the given selector and adds the conversions defined at that index to the map of conversionsByIndex. This method is called in the same sequence each selector was created (in At the end of the process, the map of conversionsByIndex will have each index with its list of conversions in the order they were declared.
| |
| registerConversions | back to summary |
|---|---|
| public FieldSet Registers a sequence of conversions to a set of fields. The selector instance that is used to store which fields should be converted is added to the This is required further conversion sequences might be added to the same fields in separate calls.
| |
| validateDuplicates | back to summary |
|---|---|
| private static void validateDuplicates(FieldSelector selector, List<Conversion<?, ?>> conversionsAtIndex, Conversion<?, ?>[] conversionsToAdd) Ensures an individual field does not have the same conversion object applied to it more than once.
| |