/** * <p>Convert the input object into a java.lang.Character.</p> * * @param <T> Target type of the conversion. * @param type Data type to which this value should be converted. * @param value The input value to be converted. * @return The converted value. * @throws Exception if conversion cannot be performed successfully * @since 1.8.0 */ @Override protected <T> T convertToType(final Class<T> type, final Object value) throws Exception { if (Character.class.equals(type) || Character.TYPE.equals(type)) { return type.cast(new Character(value.toString().charAt(0))); } throw conversionException(type, value); }
/** * <p>Convert the input object into a java.lang.Character.</p> * * @param <T> Target type of the conversion. * @param type Data type to which this value should be converted. * @param value The input value to be converted. * @return The converted value. * @throws Exception if conversion cannot be performed successfully * @since 1.8.0 */ @Override protected <T> T convertToType(final Class<T> type, final Object value) throws Exception { if (Character.class.equals(type) || Character.TYPE.equals(type)) { return type.cast(new Character(value.toString().charAt(0))); } throw conversionException(type, value); }
/** * <p>Convert the input object into a java.lang.Character.</p> * * @param <T> Target type of the conversion. * @param type Data type to which this value should be converted. * @param value The input value to be converted. * @return The converted value. * @throws Exception if conversion cannot be performed successfully * @since 1.8.0 */ @Override protected <T> T convertToType(final Class<T> type, final Object value) throws Exception { if (Character.class.equals(type) || Character.TYPE.equals(type)) { return type.cast(new Character(value.toString().charAt(0))); } throw conversionException(type, value); }