Re: [RNG] Generating for nums

2017-08-04 Thread Amey Jadiye
That convinced me +1. rng or lang both feels good to me. Regards, Amey On Fri, Aug 4, 2017 at 11:40 PM, Gary Gregory wrote: > For example, I have a enum like: > > public enum CardinalDirection (NORTH,SOUTH,EAST,WEST) > > and I want to say > > traveler.travel(nextRandomDirection()); > > where >

Re: [RNG] Generating for nums

2017-08-04 Thread Gary Gregory
For example, I have a enum like: public enum CardinalDirection (NORTH,SOUTH,EAST,WEST) and I want to say traveler.travel(nextRandomDirection()); where public CardinalDirection nextRandomDirection() { return rng.next(CardinalDirection.class); } Gary On Fri, Aug 4, 2017 at 11:02 AM, Amey Ja

Re: [RNG] Generating for nums

2017-08-04 Thread Amey Jadiye
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

[RNG] Generating for nums

2017-08-04 Thread Gary Gregory
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