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

spring.turbo.util.CastUtils Maven / Gradle / Ivy

package spring.turbo.util;

import org.springframework.lang.Nullable;

/**
 * 类型转换工具
 *
 * @author 应卓
 * @since 3.2.5
 */
@SuppressWarnings("unchecked")
public final class CastUtils {

    /**
     * 私有构造方法
     */
    private CastUtils() {
    }

    @Nullable
    public static  T castNullable(@Nullable Object object) {
        return (T) object;
    }

    public static  T castNonNull(Object object) {
        Asserts.notNull(object);
        return (T) object;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy