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

com.github.basking2.sdsai.itrex.packages.CastingPackage Maven / Gradle / Ivy

There is a newer version: 1.1.23
Show newest version
package com.github.basking2.sdsai.itrex.packages;

import com.github.basking2.sdsai.itrex.functions.FunctionInterface;
import com.github.basking2.sdsai.itrex.util.TypeConversion;

/**
 * Using {@link TypeConversion} build type casting functions for import.
 */
public class CastingPackage {
    public static final FunctionInterface toString = (itr, ctx) -> TypeConversion.toString(itr.next());
    public static final FunctionInterface toInt =  (itr, ctx) -> TypeConversion.toInt(itr.next());
    public static final FunctionInterface toFloat = (itr, ctx) -> TypeConversion.toFloat(itr.next());
    public static final FunctionInterface toLong =  (itr, ctx) -> TypeConversion.toLong(itr.next());
    public static final FunctionInterface toDouble =  (itr, ctx) -> TypeConversion.toDouble(itr.next());
    public static final FunctionInterface toBoolean =  (itr, ctx) -> TypeConversion.toBoolean(itr.next());
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy