Interface IdentityTransformer
- All Superinterfaces:
Transformer
- All Known Implementing Classes:
CoerceStringsTransformer,DateEpochTransformer,DateISOStringTransformer,EpochDateTransformer,InsertKeyTransformer,ISOStringDateTransformer
Guarantees that a single record will be produced for each record consumed. The
record may be modified during this process.
- Author:
- jbanes
-
Method Summary
Modifier and TypeMethodDescriptiontransform(JSONObject record) Transforms the provided record in some way.default Iterator<JSONObject> transform(Iterator<JSONObject> iterator) Transforms a collection ofJSONObjectrecords by applying the transformation to each element.Methods inherited from interface com.invirgance.convirgance.transform.Transformer
transform
-
Method Details
-
transform
Transforms the provided record in some way.- Parameters:
record- The JSONObject to transform/modify.- Returns:
- The modified JSONObject.
- Throws:
ConvirganceException- If an error occurs while making transformations.
-
transform
Transforms a collection ofJSONObjectrecords by applying the transformation to each element. This method is intended for use when transforming a collection of records. It returns an iterator that applies the transformation to eachJSONObjectin the collection.- Specified by:
transformin interfaceTransformer- Parameters:
iterator- TheIteratorover a collection ofJSONObjectto be transformed.- Returns:
- An
Iteratorof transformedJSONObjects. - Throws:
ConvirganceException- If an error occurs during the transformation process.
-