[
https://issues.apache.org/jira/browse/LANG-834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13868993#comment-13868993
]
Benedikt Ritter commented on LANG-834:
--------------------------------------
{code}
bene@localhost:~/workspace/apache/commons/lang$ svn ci -m "LANG-834: Validate:
add inclusiveBetween and exclusiveBetween overloads for primitives types.
Initial patch provided by Sebb."
Sending src/changes/changes.xml
Sending src/main/java/org/apache/commons/lang3/Validate.java
Sending src/test/java/org/apache/commons/lang3/ValidateTest.java
Transmitting file data ...
Committed revision 1557509.
{code}
I've added an overload for double and some tests.
> Validate: add inclusiveBetween and exclusiveBetween overloads for primitives
> types
> ----------------------------------------------------------------------------------
>
> Key: LANG-834
> URL: https://issues.apache.org/jira/browse/LANG-834
> Project: Commons Lang
> Issue Type: Improvement
> Components: lang.*
> Affects Versions: 3.1
> Reporter: Sebb
> Assignee: Benedikt Ritter
> Fix For: 3.3
>
> Attachments: LANG-834.patch
>
>
> Validate.inclusiveBetween() is often going to be used with primitives, so it
> might make sense to add
> inclusiveBetween(long start, long end, long value)
> and
> inclusiveBetween(long start, long end, long value, String message)
> This would avoid the overhead of using boxing and compareTo() for the
> primitive number types.
> Note: I tried adding
> inclusiveBetween(long start, long end, long value, String message, Object ...
> values)
> but that causes the compiler to complain about ambiguous methods.
> However, that's unlikely to be needed much.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)