본문 바로가기

지식쌓기

SAM Conversion

SAM-Conversion이란?

This is possible when the required type is an interface or abstract class with a Single (exactly one) Abstract Methods. Such a class is sometypes called a SAM-type, and the conversion from a lambda expression to an anonymous class is sometimes called SAM-conversion.

http://www.gnu.org/software/kawa/Anonymous-classes.html

 

Kawa: Anonymous classes

Syntax: object (supers ...) field-or-method-decl ... Lambda as shorthand for anonymous class An anonymous class is commonly used in the Java platform where a function language would use a lambda expression. Examples are call-back handlers, events handlers,

www.gnu.org