commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r1030464 [1/3] - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/ main/java/org/apache/commons/math/analysis/ main/java/org/apache/commons/math/analysis/integration/ main/java/org/apache/commons/math/analysis/inte
Date Thu, 04 Nov 2010 01:48:43 GMT
On 4 November 2010 01:31, Brent Worden <brent.worden@gmail.com> wrote:
> On 11/3/2010 8:10 PM, Bill Barker wrote:
>>>
>>>  */
>>> public interface UnivariateRealFunction {
>>> -
>>>    /**
>>> -     * Compute the value for the function.
>>> -     * @param x the point for which the function value should be
>>> computed
>>> -     * @return the value
>>> -     * @throws FunctionEvaluationException if the function evaluation
>>> fails
>>> +     * Compute the value of the function.
>>> +     *
>>> +     * @param x Point at which the function value should be computed.
>>> +     * @return the value.
>>>     */
>>> -    double value(double x) throws FunctionEvaluationException;
>>> -
>>> +    double value(double x);
>>> }
>>>
>>  * @version $Revision$ $Date$
>>
>> IMHO we still need the @throws line in the javadoc.  Otherwise end users
>> are going to get a nasty surprise when they get an unchecked exception
>> thrown.
>>
>>
> +1.  This is a nicety other commons projects have employed and is indeed
> quite useful during development.

Also, the abstract class that implements the interface -
ComposableFunction - has the method sig:

public abstract double value(double x) throws FunctionEvaluationException;

It's confusing that the interface and class don't agree.

> Thanks,
>
> Brent.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message