Class TypeConversion.ListConversion

  • All Implemented Interfaces:
    TypeConversion<java.util.List<?>>
    Enclosing interface:
    TypeConversion<T>

    public static class TypeConversion.ListConversion
    extends java.lang.Object
    implements TypeConversion<java.util.List<?>>
    Converts GenericData.Array (, which is a List,) into List The conversion is identity. It is basically from list to list. The conversion is done recursively, meaning the elements of the input are converted too.
    • Constructor Detail

      • ListConversion

        public ListConversion()
    • Method Detail

      • convert

        public java.util.List<?> convert​(org.apache.avro.Schema fieldSchema,
                                         @NotNull
                                         java.lang.Object fieldValue)
        Description copied from interface: TypeConversion
        Convert value from the source type to the target type. Runtime exceptions are thrown on invalid argument or conversion failure.
        Specified by:
        convert in interface TypeConversion<java.util.List<?>>
        Parameters:
        fieldSchema - avro schema to loop up the source schema
        fieldValue - value in the source type. The value cannot be null.
        Returns:
        the converted value