You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Alex Herbert (Jira)" <ji...@apache.org> on 2021/10/10 21:13:00 UTC
[jira] [Resolved] (STATISTICS-41) Use factory constructors
[ https://issues.apache.org/jira/browse/STATISTICS-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Herbert resolved STATISTICS-41.
------------------------------------
Fix Version/s: 1.0
Resolution: Implemented
Added in commit:
2b72bb361cdc38ffc19c94bba866c024006742b2
> Use factory constructors
> ------------------------
>
> Key: STATISTICS-41
> URL: https://issues.apache.org/jira/browse/STATISTICS-41
> Project: Apache Commons Statistics
> Issue Type: Improvement
> Components: distribution
> Affects Versions: 1.0
> Reporter: Alex Herbert
> Priority: Minor
> Fix For: 1.0
>
>
> All distribution currently use a public instance constructor.
> Some implementations have different logic depending on the input arguments. This is currently handled by using method references to store the function implementation of e.g. the PMF for the distribution.
> I suggest moving to private constructors with factory methods. These can create dedicated sub-class instances appropriate for the parameters.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)