[ https://issues.apache.org/jira/browse/NUMBERS-123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16877317#comment-16877317 ]
Heinrich Bohne commented on NUMBERS-123: ---------------------------------------- Actually, it's not really that big of a deal, so I'd suggest we just leave it at that. Personally, I would still prefer the old design, but I think the length of the discussion about this is starting to outweigh the actual significance of the problem, especially seeing as there are other, undeniably more significant issues to be resolved in this project. I do realize, however, that having the responsibility of ensuring the validity of the fields located in one place is nice, so this is a benefit of having a single constructor. > "BigFraction(double)" is unnecessary > ------------------------------------ > > Key: NUMBERS-123 > URL: https://issues.apache.org/jira/browse/NUMBERS-123 > Project: Commons Numbers > Issue Type: Improvement > Components: fraction > Reporter: Gilles > Assignee: Gilles > Priority: Trivial > Fix For: 1.0 > > Attachments: NUMBERS-123__Javadoc.patch > > Time Spent: 0.5h > Remaining Estimate: 0h > > Constructor {{BigFraction(double value)}} is only called from the > {{from(double value)}} method. > Actually, this constructor is misleading as it is indeed primarily a > conversion from which appropriate {{numerator}} and {{denominator}} fields > are computed; those could be set by > the "direct" constructor {{BigFraction(BigInteger num, BigInteger den)}}. > Moreover, the private field {{ZERO}} goes through this conversion code > whereas it could constructed "directly", e.g. using {{of(0)}}. Similarly for > field {{ONE}}. -- This message was sent by Atlassian JIRA (v7.6.3#76005)