Uploaded image for project: 'Commons Statistics'
  1. Commons Statistics
  2. STATISTICS-41

Use factory constructors

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Implemented
    • 1.0
    • 1.0
    • distribution
    • None

    Description

      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.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            aherbert Alex Herbert
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: