commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Duncan Jones (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-900) New RandomUtils class
Date Sat, 11 Jan 2014 14:23:51 GMT

    [ https://issues.apache.org/jira/browse/LANG-900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13868793#comment-13868793
] 

Duncan Jones commented on LANG-900:
-----------------------------------

Personally, I would err on the side of simplicity and leave the arguments as they are. I don't
think the methods would benefit from any of the functionality of the Range class, so it would
merely serve as a fancy vehicle for the parameters.

Did you see this older mail thread about this patch? I'm still unsure of the best approach
for the ranges: http://markmail.org/message/ociheefil7mq3na7

> New RandomUtils class
> ---------------------
>
>                 Key: LANG-900
>                 URL: https://issues.apache.org/jira/browse/LANG-900
>             Project: Commons Lang
>          Issue Type: New Feature
>            Reporter: Duncan Jones
>            Priority: Minor
>             Fix For: Review Patch, Discussion
>
>         Attachments: RandomUtils.java, RandomUtilsTest.java
>
>
> Attached is a new {{RandomUtils}} class and associated test, which offers some methods
not available in the standard {{Random}} class:
>  - a {{nextBytes(int count)}} method that returns a byte array
>  - versions of {{nextInt}}, {{nextLong}}, {{nextFloat}} and {{nextDouble}} that return
a value within a range.
> Comments very welcome!



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message