All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kinotic.continuum.idl.api.converter.C3ConversionContext Maven / Gradle / Ivy

package org.kinotic.continuum.idl.api.converter;

import org.kinotic.continuum.idl.api.schema.C3Type;

/**
 * A context that can be used to convert a {@link C3Type} to a specific type.
 * Also, can store custom state for use during or after the conversion process.
 *
 * @param  The type to convert to
 * @param  The state type
 *
 * Created by Navíd Mitchell 🤪 on 4/26/23.
 */
public interface C3ConversionContext {

    /**
     * Converts the given {@link C3Type} to the type specified by resolving the proper {@link C3TypeConverter} converter
     *
     * @param c3Type to convert
     * @return the converted value
     */
    R convert(C3Type c3Type);

    /**
     * @return the state of this {@link C3ConversionContext}
     */
    S state();

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy