On Sat, 28 Sep 2002, Steve Downey wrote:

> Does   :
> public static String random(int count, int start, int end, boolean letters,
> boolean numbers, char[] set)
>
> really need to be public? Odds of correct use seem to be pretty low. It's a
> nice as a shared implementation, but it doesn't look like something that
> someone would really use.

Dunno. Am trying to think of permutations which are not handled by one of
the other methods, especially for unicode users, which I think there are
ones of. Someone wanting random japanese numbers can get it via this
method without just defining the numbers. ie) They can have an attribute
of 'char[] JAPANESE_CHARACTERS' and allow the numbers parameter to do its
job.

Mostly though, I just tend to favour open APIs, which I admit are harder
to maintain/upgrade.

>
> Also, drawing and rejecting random characters can tail off forever. It's
> probablistic O(n), but the constant is proportional to the density of the
> allowed characters out of all characters. Something for the future. I didn't
> note this in the docs. Should I?

I'm in favour of all methods containing an algorithm in Lang specifying an
order. Someone just mentioned this exact idea on the XOM list. They
suggested a @order javadoc attribute or something.

Hen


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to