commons-issues mailing list archives

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

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

Gilles commented on NUMBERS-42:
-------------------------------

bq. make the constructors private

+1


> 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 Complex ofCartesian(double re, double im) { /*... */ }
> public Complex ofPolar(double r, 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