commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (NUMBERS-42) Factory methods
Date Sat, 27 Jan 2018 17:17:00 GMT

     [ https://issues.apache.org/jira/browse/NUMBERS-42?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gilles updated NUMBERS-42:
--------------------------
    Description: 
Wherever applicable, provide {{of}} factory methods.
For example, in "complex.java":
{code}
public static Complex ofCartesian(double re, double im) { /*... */ }
public static Complex ofPolar(double r, double theta) { /*... */ }
public static Complex ofCis(double theta) { /*... */ }
{code}

To be considered: make the constructors private (or protected).

  was:
Wherever applicable, provide {{of}} factory methods.
For example, in "complex.java":
{code}
public Complex ofCartesian(double re, double im) { /*... */ }
public Complex ofPolar(double r, double theta) { /*... */ }
{code}

To be considered: make the constructors private (or protected).


> Factory methods
> ---------------
>
>                 Key: NUMBERS-42
>                 URL: https://issues.apache.org/jira/browse/NUMBERS-42
>             Project: Commons Numbers
>          Issue Type: New Feature
>            Reporter: Gilles
>            Priority: Trivial
>              Labels: api
>             Fix For: 1.0
>
>
> Wherever applicable, provide {{of}} factory methods.
> For example, in "complex.java":
> {code}
> public static Complex ofCartesian(double re, double im) { /*... */ }
> public static Complex ofPolar(double r, double theta) { /*... */ }
> public static Complex ofCis(double theta) { /*... */ }
> {code}
> To be considered: make the constructors private (or protected).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message