mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-24 23:19:30 +07:00
GitOrigin-RevId: 0ebf69e18055cb4e5a4e74f7483f39afdc072ef4
16 lines
331 B
Java
16 lines
331 B
Java
// "Extract Set from comparison chain" "true-preview"
|
|
|
|
import java.util.Set;
|
|
|
|
class Orchard {
|
|
private static final Set<String> FRUITS = Set.of("Apple", "Pear", "Banana");
|
|
|
|
boolean check(String fruit) {
|
|
/*1*/
|
|
/*2*/
|
|
/*3*/
|
|
/* 4 */
|
|
/*5*/
|
|
return FRUITS.contains(fruit)/*6*/;
|
|
}
|
|
} |