/** * Convert to primitive types, returning default value if text is null. * * @param defaultValue * the default value to return of text is null * @return the converted text as a primitive or the default if text is null * @throws StringValueConversionException */ public final char toChar(final char defaultValue) throws StringValueConversionException { return (text == null) ? defaultValue : toChar(); }
/** * Convert to primitive types, returning default value if text is null. * * @param defaultValue * the default value to return of text is null * @return the converted text as a primitive or the default if text is null * @throws StringValueConversionException */ public final char toChar(final char defaultValue) throws StringValueConversionException { return (text == null) ? defaultValue : toChar(); }
/** * Convert this text to a Character. * * @return Converted text * @throws StringValueConversionException */ public final Character toCharacter() throws StringValueConversionException { return toChar(); }
/** * Convert this text to a Character. * * @return Converted text * @throws StringValueConversionException */ public final Character toCharacter() throws StringValueConversionException { return new Character(toChar()); }
/** * Convert this text to a Character. * * @return Converted text * @throws StringValueConversionException */ public final Character toCharacter() throws StringValueConversionException { return new Character(toChar()); }
/** * Convert to character, returning default value if text is inconvertible. * * @param defaultValue * the default value * @return the converted text as a primitive char or the default value if text is not a single * character */ public final char toChar(final char defaultValue) { if (text != null) { try { return toChar(); } catch (StringValueConversionException x) { if (LOG.isDebugEnabled()) { LOG.debug(String.format( "An error occurred while converting '%s' to a character: %s", text, x.getMessage()), x); } } } return defaultValue; }
return pageParameters.get(key).toDouble(); } else if (Character.TYPE.equals(objectType) == true) { return pageParameters.get(key).toChar(); } else { log.warn(