Is Comparator SAM interface ?

Zdenek Tronicek tronicek at fit.cvut.cz
Sun Jan 10 21:58:07 PST 2010


equals is available in every class because it is inherited from Object.
So, Comparator belongs to the Single Abstract Method interfaces.

Z.
-- 
Zdenek Tronicek
FIT CTU in Prague


Artur Biesiadowski napsal(a):
> Hello,
>
> For the function conversion, straw-man proposal is expecting interfaces
> defining just one method. It might require wording differently - if read
> literally, java.util.Comparator is not suitable for function conversion,
> because it restates 'equals' in the interface in addition to compare.
> Same goes for Predicate in google collections and probably some other
> classes in different libraries.
>
> Regards,
> Artur Biesiadowski
>
>



More information about the lambda-dev mailing list