You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Benedikt Ritter (JIRA)" <ji...@apache.org> on 2014/01/11 14:38:51 UTC

[jira] [Commented] (LANG-900) New RandomUtils class

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

Benedikt Ritter commented on LANG-900:
--------------------------------------

Very nice patch. I'm currently wondering if it may make sense to incorporate {{org.apache.commons.lang3.Range}} as possible parameter for the nextXxx Methods that take a range. The problem may be, that the Range class uses inclusive bounds and the nextXxx methods take in inclusive lower and and exclusive upper bound. WDYT?

> 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)