/** * Convert to object types, returning null if text is null. * * @return converted * @throws StringValueConversionException */ public final Time toOptionalTime() throws StringValueConversionException { return (text == null) ? null : toTime(); }
/** * 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 Time toTime(final Time defaultValue) throws StringValueConversionException { return (text == null) ? defaultValue : toTime(); }
/** * 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 Time toTime(final Time defaultValue) throws StringValueConversionException { return (text == null) ? defaultValue : toTime(); }
/** * Convert to object types, returning null if text is null. * * @return converted * @throws StringValueConversionException */ public final Time toOptionalTime() throws StringValueConversionException { return (text == null) ? null : toTime(); }
/** * @see IValueMap#getTime(String) */ public final Time getTime(final String key) throws StringValueConversionException { return getStringValue(key).toTime(); }
/** * @see IValueMap#getTime(String) */ @Override public final Time getTime(final String key) throws StringValueConversionException { return getStringValue(key).toTime(); }
/** * @see IValueMap#getTime(String) */ public final Time getTime(final String key) throws StringValueConversionException { return getStringValue(key).toTime(); }
/** * @see IValueMap#getTime(String) */ public Time getTime(String key) throws StringValueConversionException { return getStringValue(key).toTime(); }
/** * Convert to object types, returning null if text is null or empty. * * @return converted * @throws StringValueConversionException */ public final Time toOptionalTime() throws StringValueConversionException { return Strings.isEmpty(text) ? null : toTime(); }
/** * @see IValueMap#getTime(String) */ public Time getTime(String key) throws StringValueConversionException { return getStringValue(key).toTime(); }
/** * Convert to time, returning default value if text is inconvertible. * * @param defaultValue * the default value * @return the converted text as a time or the default value if text is inconvertible. */ public final Time toTime(final Time defaultValue) { if (text != null) { try { return toTime(); } catch (StringValueConversionException x) { if (LOG.isDebugEnabled()) { LOG.debug(String.format( "An error occurred while converting '%s' to a Time: %s", text, x.getMessage()), x); } } } return defaultValue; }
@Override public Time getTime(String key) throws StringValueConversionException { return StringValue.valueOf(getKey(key)).toTime(); }
return (T)toTime();