MapperUtil { public static <T> ToChar<T> mapChar(ToChar<T> expression, CharUnaryOperator mapper) { return new ToCharMapper<T, ToChar<T>, CharUnaryOperator>(expression, mapper) { @Override public char applyAsChar(T object) { return this.mapper.applyAsChar(this.inner.applyAsChar(object)); } @Override public MapperType mapperType() { return MapperType.CHAR_TO_CHAR; } }; } private  MapperUtil(); static ToBoolean<T> mapBoolean(ToBoolean<T> expression, BooleanUnaryOperator mapper); static ToDouble<T> mapBooleanToDouble(ToBoolean<T> expression, BooleanToDoubleFunction mapper); static ToChar<T> mapChar(ToChar<T> expression, CharUnaryOperator mapper); static ToByte<T> mapByte(ToByte<T> expression, ByteUnaryOperator mapper); static ToDouble<T> mapByteToDouble(ToByte<T> expression, ByteToDoubleFunction mapper); static ToShort<T> mapShort(ToShort<T> expression, ShortUnaryOperator mapper); static ToDouble<T> mapShortToDouble(ToShort<T> expression, ShortToDoubleFunction mapper); static ToInt<T> mapInt(ToInt<T> expression, IntUnaryOperator mapper); static ToDouble<T> mapIntToDouble(ToInt<T> expression, IntToDoubleFunction mapper); static ToLong<T> mapLong(ToLong<T> expression, LongUnaryOperator mapper); static ToDouble<T> mapLongToDouble(ToLong<T> expression, LongToDoubleFunction mapper); static ToFloat<T> mapFloat(ToFloat<T> expression, FloatUnaryOperator mapper); static ToDouble<T> mapFloatToDouble(ToFloat<T> expression, FloatToDoubleFunction mapper); static ToDouble<T> mapDouble(ToDouble<T> expression, DoubleUnaryOperator mapper); static ToString<T> mapString(ToString<T> expression, UnaryOperator<String> mapper); static ToEnum<T, E> mapEnum(ToEnum<T, E> expression, UnaryOperator<E> mapper); static ToBigDecimal<T> mapBigDecimal(ToBigDecimal<T> expression, UnaryOperator<BigDecimal> mapper); static ToDouble<T> mapBigDecimalToDouble(ToBigDecimal<T> expression, ToDoubleFunction<BigDecimal> mapper);  }
@Test void mapChar() { final ToChar<Character> toChar = c -> c; final ToCharMapper<Character, ToChar<Character>, CharUnaryOperator> toCharMapper = (ToCharMapper<Character, ToChar<Character>, CharUnaryOperator>) MapperUtil.mapChar(toChar, c -> c); assertEquals(MapperType.CHAR_TO_CHAR, toCharMapper.mapperType()); }