You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2012/06/01 11:07:23 UTC
[jira] [Commented] (WICKET-4580) StringValue: missing methods to
convert from text to wrapped classes of primitive type with defaultValue
[ https://issues.apache.org/jira/browse/WICKET-4580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287279#comment-13287279 ]
Martin Grigorov commented on WICKET-4580:
-----------------------------------------
public final long toLong(final long defaultValue)
vs.
toLongObject(final Long defaultValue)
Java (un)boxing will do this automatically for you, no ?
> StringValue: missing methods to convert from text to wrapped classes of primitive type with defaultValue
> --------------------------------------------------------------------------------------------------------
>
> Key: WICKET-4580
> URL: https://issues.apache.org/jira/browse/WICKET-4580
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.5.6
> Reporter: manthos
>
> org.apache.wicket.util.string.StringValue has methods to convert from String to a specific type with a defaultValue if text is empty or inconvertible.
> example:
> public final long toLong(final long defaultValue)
> Missing equivalent methods working with wrapped classes of primitive type.
> New methods:
> toBooleanObject(final Boolean defaultValue)
> toCharacter(final Character defaultValue)
> toDoubleObject(final Double defaultValue)
> toInteger(final Integer defaultValue)
> toLongObject(final Long defaultValue)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira