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

Robert Scholte commented on LANG-425:
-------------------------------------

I'm still wondering if there's enough interest.

The suggestion of James is a good start.
Maybe the following constructorswould be nice to include:
{code:title=StringSequence.java}
 /** starting with first char of alpabet */
 public StringSequence(String alphabet);

 /** starting with 'offset' using chars in alpabet */
 public StringSequence(String alphabet, String offset);
 
 /** starting with first char of charRange */
 public StringSequence(CharRange charRange)

 /** starting with 'offset' using chars in charRange */
 public StringSequence(CharRange charRange, String offset)

 /** starting with first char of charSet */
 public StringSequence(CharSet charSet)

 /** starting with 'offset' using chars in charSet */
 public StringSequence(CharSet charSet, String offset)
{code}

{code:title=IntegerSequence.java}
public IntegerSequence(Integer offset)
public IntegerSequence(Integer offset, int step)
{code}

{code:title=LongSequence.java}
public LongSequence(Long offset)
public LongSequence(Long offset, long step)
{code}

Every class would have a next() or nextValue(), maybe even previous or 
previousValue()

> 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