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

rfscholte-getthere edited comment on LANG-425 at 4/27/08 10:56 AM:
---------------------------------------------------------------

Oops, my mistake. Some expected results would have been right.

NextInt(10)  is actually 11 (a simple ++ would do the trick already), but what 
about the object-version. So nextInteger(new Integer(10)) would result in new 
Integer(11);
Now the strings:
MORE + 1 = MORF; MORF+1 = MORG .... MORZ+1= MOSA .... MOZZ+1 = MPAA; .... 
ZZZZ+1= ? (maybe outOfBounds)
with a second argument you could define the chars to use and it's order.
so: C0DE (C-zero-DE) > C0DF > C0E0 > C0E1 and so on
Maybe an optional step (like for-loops) could be interesting
for Floats and Doubles it's more tricky. These types will always require a step.

      was (Author: rfscholte-getthere):
    Oops, my mistake. Some expected results would have been right.

NextInt(10)  is actually 11 (a simple ++ would do the trick already), but what 
about the object-version. So nextInteger(new Integer(10)) would result in new 
Integer(11);
Now the strings:
MORE + 1 = MORF; MORF+1 = MORG .... MORZ+1= MOSA .... MOZZ+1 = MPAA; .... 
ZZZZ+1= ? (maybe outOfBounds)
with a second argument you could define the chars to use and it's order.
so: C0DE (C-zero-DE) > C0DF > C0E0 > C0D1 and so on
Maybe an optional step (like for-loops) could be interesting
for Floats and Doubles it's more tricky. These types will always require a step.
  
> Sequence(String)Utils
> ---------------------
>
>                 Key: LANG-425
>                 URL: https://issues.apache.org/jira/browse/LANG-425
>             Project: Commons Lang
>          Issue Type: Wish
>    Affects Versions: 2.4
>            Reporter: Robert Scholte
>            Priority: Trivial
>
> Don't you think it's kind of strange to have RandomUtils and 
> RandomStringUtils, but not just the ordinairy SequenceUtils?
> I've seen commons-id in the sandbox, but maybe some basics should become part 
> of commons lang.
> Most classes of within this package are stateless/static, or they have a 
> state within a method (such as StrBuilder). SequenceUtils can only be static, 
> if it has the startValue.
> For example
> {code}
> SequenceUtils.nextInt(10)
> SequenceUtils.nextString("MORE")
> SequenceUtils.nextBoolean(true) //ok, this one is stupid but quite clear
> SequenceUtils.nextString("C0DE", "0123456789ABCDEF") //next hexadecimal
> {code}
> any more ideas?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to