Pattern matching (since Java 16)
GPTKB entity
Statements (18)
| Predicate | Object |
|---|---|
| gptkbp:instanceOf |
gptkb:Java_language_feature
|
| gptkbp:appliesTo |
instanceof operator
|
| gptkbp:category |
gptkb:type_system
Java syntax |
| gptkbp:enables |
type pattern declaration in instanceof
|
| gptkbp:example |
if (obj instanceof String s) { ... }
|
| gptkbp:improves |
readability
conciseness |
| gptkbp:introducedIn |
gptkb:Java_16
|
| gptkbp:JEP_number |
gptkb:JEP_394
|
| gptkbp:purpose |
simplify type checks and casts
|
| gptkbp:relatedTo |
sealed classes
record classes |
| gptkbp:statusInJava16 |
preview feature
|
| gptkbp:statusInJava17 |
gptkb:standard_feature
|
| gptkbp:bfsParent |
gptkb:Java_Standard_Edition
|
| gptkbp:bfsLayer |
7
|
| https://www.w3.org/2000/01/rdf-schema#label |
Pattern matching (since Java 16)
|