mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-15 16:56:48 +07:00
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*/;
|
|
}
|
|
} |