package me.chyxion.tigon.form;

import java.io.Serializable;

/**
 * @version 0.0.1
 * @since 0.0.1
 * @author Shaun Chyxion <br>
 * chyxion@163.com <br>
 * Oct 8, 2016 5:25:13 PM
 */
public interface BaseFormApi extends Serializable {

    /**
     * copy to class
     * @param clazz to class
     * @param <T> to class type
     * @return copy result
     */
    <T> T copy(Class<T> clazz); 

    /**
     * @param clazz to class
     * @param <T> to class type
     * @param convert convert prop
     * @return copy result
     */
    <T> T copy(Class<T> clazz, boolean convert); 

    /**
     * @param obj copy to object
     * @param <T> to class type
     * @return copy result
     */
    <T> T copy(T obj); 

    /**
     * copy props with converting
     * @param obj copy to object
     * @param convert convert prop
     * @param <T> to class type
     * @return copy result
     */
    <T> T copy(T obj, boolean convert); 
}
