commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Tompkins (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TEXT-97) RandomStringGenerator should be able to pass multiple ranges to .withinRange()
Date Fri, 07 Jul 2017 13:20:00 GMT

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

Rob Tompkins commented on TEXT-97:
----------------------------------

Oh....no strong opinions here...the input validation is the only point to keep in mind, I
think. If we do go with the current pull request design, we'd probably want more input validation
and accompanying documentation.

> RandomStringGenerator should be able to pass multiple ranges to .withinRange()
> ------------------------------------------------------------------------------
>
>                 Key: TEXT-97
>                 URL: https://issues.apache.org/jira/browse/TEXT-97
>             Project: Commons Text
>          Issue Type: Improvement
>            Reporter: Amey Jadiye
>             Fix For: 1.2
>
>
> Users should have ability to pass multiple ranges to generate desired output.
> Ex. For
> *.randomNumeric()*
> {code}
> char [][]  ranges = {{'0','9'}};
> RandomStringGenerator generator = new RandomStringGenerator.Builder().withinRange(ranges).build();
> {code}
> *.randomAlphabetic()*
> {code}
> char [][]  ranges = {{'A','Z'}}; // or {{'A','Z'},{'a','z'}}
> RandomStringGenerator generator = new RandomStringGenerator.Builder().withinRange(ranges).build();
> {code}
> *.randomAlphanumeric()*
> {code}
> char [][]  ranges = {{'0','9'},{'A','Z'},{'a','b'}};
> RandomStringGenerator generator = new RandomStringGenerator.Builder().withinRange(ranges).build();
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message