com.github.basking2.sdsai.itrex.packages.CastingPackage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdsai-itrex Show documentation
Show all versions of sdsai-itrex Show documentation
An S-Expression inspiried library focused on iterators.
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