filmov
tv
Method reference Tutorial - Java 8 features

Показать описание
Java 8 indroduces a new feature called method reference to give a reference to a method.
Method references are used to refer to methods of functional interfaces directly.
When a lambda expression is used solely to invoke a method on an object or class, it can often be replaced with a method reference.
This results in cleaner and more concise code
00:00 Introduction
01:36 "Method reference types"
01:59 "Reference to a static method"
02:16 "Reference to a static method usage"
02:51 "Instance Method Reference of a particular object"
03:16 "Instance Method Reference of a particular object usage"
03:43 "Reference to an instance method of an arbitrary object of a particular type"
04:10 "Reference to an instance method of an arbitrary object of a particular type usage"
04:41 "Reference to a constructor"
04:55 Reference to a constructor usage"
Method references are used to refer to methods of functional interfaces directly.
When a lambda expression is used solely to invoke a method on an object or class, it can often be replaced with a method reference.
This results in cleaner and more concise code
00:00 Introduction
01:36 "Method reference types"
01:59 "Reference to a static method"
02:16 "Reference to a static method usage"
02:51 "Instance Method Reference of a particular object"
03:16 "Instance Method Reference of a particular object usage"
03:43 "Reference to an instance method of an arbitrary object of a particular type"
04:10 "Reference to an instance method of an arbitrary object of a particular type usage"
04:41 "Reference to a constructor"
04:55 Reference to a constructor usage"