commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amey Jadiye <ameyjad...@gmail.com>
Subject Re: [RNG] Generating for nums
Date Fri, 04 Aug 2017 18:02:24 GMT
Hi,

What's usecase for this BTW ? Might be unaware about requirement but this
forced me to think why would someone need random enum ?

Enums are generally "limited" immutable constants and people choose enum
over the array of constants for good reason, however random provider seems
best suited for choosing value from any Data-Structure holding "lot" of
values.

I think it's little weird but I would be happy  if someone explain
advantages. :-)

Regards,
Amey

On Fri, Aug 4, 2017, 11:17 PM Gary Gregory <garydgregory@gmail.com> wrote:

> Hi All,
>
> Any thoughts on generation when you want to the domain to be an enum?
>
> SomeEnum e = UniformRandomProvider.next(SomeEnum);
>
> ?
>
> Is that too weird for this component?
>
> Gary
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message