« The Art of Java Language Pattern Matching »
Tuesday 9 July 17:10 - 18:00
Amphi 139 (160 places)

The goal of project Amber within OpenJDK is to explore the inclusion of smaller, productivity-oriented Java language features. One part of this that has delivered new functionality in recent versions is pattern matching. Pattern matching combines application code logic to test if an expression has a specific type or structure and extract components of its state for processing. Pattern matching is now well embedded in the Java language using the following features, defined by JDK Enhancement Proposals (JEPs)  Pattern matching for instanceof (JEP 433)  Pattern matching for switch (JEP 441)  Record patterns (JEP 440)  Unnamed patterns and variables (JEP 456)  Primitive types in patterns, instanceof and switch (JEP 455) In this session, we’ll look at the details of these new language features and a more general look at pattern matching. We’ll also explore future features in this area such as array patterns, which may be included in a subsequent Java release. By the end of the session, you’ll be ready to use these powerful new features.