[ 
https://issues.apache.org/jira/browse/MATH-963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13622891#comment-13622891
 ] 

Gilles commented on MATH-963:
-----------------------------

bq. [...] RandomGenerator is supposed to be a straight replacement for 
j.u.Random.

In what sense?
"j.u.Random" not being an interface (CM's "RandomGenerator" is one, and thus 
cannot extend the former), a user code cannot pass an instance of 
"RandomGenerator" in place of "j.u.Random".

If the goal is for "RandomGenerator" to provide identically named methods, this 
is fine but nothing forbids CM to be more complete and add other methods.

If the goal (for whatever reason) is to exactly mimic the contents of 
"j.u.Random", I would change this issue to ask for the removal of the 
additional "setSeed" methods that exist in "RandomGenerator" but not in 
"j.u.Random".

bq. better to just add it to the abstract class

Then, what about removing the interface (i.e. merging) and keep only the 
abstract class?

                
> Interface "RandomGenerator" is missing "nextLong(long)" method
> --------------------------------------------------------------
>
>                 Key: MATH-963
>                 URL: https://issues.apache.org/jira/browse/MATH-963
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.2
>            Reporter: Gilles
>            Priority: Trivial
>              Labels: api-change
>
> There is a method "nextInt(int)" but not "nextLong(long)".
> The "BitsStreamGenerator" class already implements it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to