public static <T> ToInt<T> castBigDecimalToInt(ToBigDecimal<T> original) {
        class BigDecimalToInt extends CastToInt<T, ToBigDecimal<T>> {
            private BigDecimalToInt(ToBigDecimal<T> tToBigDecimal) {
                super(tToBigDecimal);
            }

            @Override
            public int applyAsInt(T object) {
                return inner.apply(object).intValueExact();
            }
        }

        return new BigDecimalToInt(original);
    }
Returns an expression that wraps the specified expression and casts the
result from it into a {@code int}.

@param original  the original expression
@param <T>       the input type
@return          the new {@link ToInt} expression
runtime-parent/runtime-compute/src/main/java/com/speedment/runtime/compute/internal/expression/CastUtil.java