You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Matt Benson (Created) (JIRA)" <ji...@apache.org> on 2012/01/21 04:04:43 UTC

[jira] [Created] (FUNCTOR-11) Reduce API clutter by removing or reducing scope of FunctorType.equals(FunctorType) methods

Reduce API clutter by removing or reducing scope of FunctorType.equals(FunctorType) methods
-------------------------------------------------------------------------------------------

                 Key: FUNCTOR-11
                 URL: https://issues.apache.org/jira/browse/FUNCTOR-11
             Project: Commons Functor
          Issue Type: Improvement
            Reporter: Emmanuel Bourg


>From http://markmail.org/message/ythw55yad5lrvqrj

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FUNCTOR-11) Reduce API clutter by removing or reducing scope of FunctorType.equals(FunctorType) methods

Posted by "Bruno P. Kinoshita (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FUNCTOR-11?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13235294#comment-13235294 ] 

Bruno P. Kinoshita commented on FUNCTOR-11:
-------------------------------------------

Hi there, 

I thought about why someone would include equals, toString and hashcode in an interface, like in Functor. As java.lang.Object implements such methods, no compile errors are raised. 

One possibility for having compile time errors would be create an abstract class with the same methods as abstract. But IMHO this option may not be always valid, and it really only clutters the API. 

However, having this in this interface can be helpful for someone interested in implementing a Functor, although this piece of information could be in the project web site, or in a Wiki or something similar. IDE's, like Eclipse, can display the Javadoc for these methods too (sometimes I let the mouse over or click F3 just to see the original code and its Javadoc).

I believe Java java.util.Map interface also contains equals and hashcode, and in the Javadoc you can read what you need to have in mind when creating your Map.

I have no strong opinion for this issue, but thought I could just give my 0.02 cents :) 

Cheers, Bruno
                
> Reduce API clutter by removing or reducing scope of FunctorType.equals(FunctorType) methods
> -------------------------------------------------------------------------------------------
>
>                 Key: FUNCTOR-11
>                 URL: https://issues.apache.org/jira/browse/FUNCTOR-11
>             Project: Commons Functor
>          Issue Type: Improvement
>            Reporter: Emmanuel Bourg
>
> From http://markmail.org/message/ythw55yad5lrvqrj

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira