Class ConvertorManager

    • Constructor Detail

      • ConvertorManager

        public ConvertorManager​(Short... supportedVersions)
        Create new instance of Convertor Manager.
        Parameters:
        supportedVersions - supported versions
    • Method Detail

      • convert

        public <F,​T,​D extends ConvertorDataOptional<T> convert​(F source,
                                                                             D data)
        Description copied from interface: ConvertorExecutor
        Lookup and use convertor by specified type, then converts source and returns converted result.
        Specified by:
        convert in interface ConvertorExecutor
        Type Parameters:
        F - the source type
        T - the result type
        D - the data type
        Parameters:
        source - the source
        data - convertor data
        Returns:
        the result (can be empty, if no convertor was found)
      • convert

        public <K,​F,​T,​D extends ConvertorDataOptional<T> convert​(Map<K,​F> source,
                                                                                     D data)
        Description copied from interface: ConvertorExecutor
        Lookup and use convertor by specified type, then converts source collection and returns converted result.
        Specified by:
        convert in interface ConvertorExecutor
        Type Parameters:
        K - the source key type
        F - the source value type
        T - the result type
        D - the data type
        Parameters:
        source - the source collection
        data - convertor data
        Returns:
        the result (can be empty, if no convertor was found)
      • convert

        public <F,​T,​D extends ConvertorDataOptional<T> convert​(Collection<F> source,
                                                                             D data)
        Description copied from interface: ConvertorExecutor
        Lookup and use convertor by specified type, then converts source collection and returns converted result.
        Specified by:
        convert in interface ConvertorExecutor
        Type Parameters:
        F - the source type
        T - the result type
        D - the data type
        Parameters:
        source - the source collection
        data - convertor data
        Returns:
        the result (can be empty, if no convertor was found)