mengdiwang / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Remove equals() from Function interface #471

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The documentation says it should almost always just use Object's equals.

This method is currently hinders Guice's assisted factory injection.  Functions 
are thus unusable as factories.  

It seems that if someone really needed equals(), they can extend the interface. 
 Otherwise Function should have one method only: apply().

Original issue reported on code.google.com by debillin on 7 Nov 2010 at 1:40

GoogleCodeExporter commented 9 years ago
The documentation says a lot more than just that.  It's important than any 
Function implementations obey what it says.

Also, there is definitively nothing wrong with specifying this method in an 
interface.  Any problems you're experiencing have to lie either with the Guice 
feature or with the way you're trying to use it.

Original comment by kevinb@google.com on 9 Nov 2010 at 7:26

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:15

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:09