[ https://issues.apache.org/jira/browse/MATH-260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb reopened MATH-260: ----------------------- Yes, I know that the getXXX(Object) methods handle Integer specially; but so does the addValue(Object) method - it has to, in case an Integer is passed as an Object. But why is there an addValue(Integer) method? What does it achieve? There are no corresponding getXXX(Integer) methods. > Inconsistent API in Frequency > ----------------------------- > > Key: MATH-260 > URL: https://issues.apache.org/jira/browse/MATH-260 > Project: Commons Math > Issue Type: Bug > Affects Versions: 2.0 > Reporter: Sebb > Priority: Minor > > The overloaded Frequency methods are not consistent in the parameter types > that they handle. > addValue() has an Integer version which converts the parameter to a Long, and > then calls addValue(Object). > The various getxxx() methods all handle Integer parameters as an Object. > Seems to me that it would be better to treat Integer consistently. > But perhaps there is a good reason for having an addValue(Integer) method but > no getxxx(Integer) methods? > If so, then it would be helpful to document this. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.