It’s had pattern matching since 16, it’s been expanded since with some syntactic sugar and more recently the introduction of sum types and exhaustiveness to go along with pattern matching.
switch (thing) {
case Integer i when i > 0 -> println(“Positive…”);
case …
}