boolean (@NotNull GrSwitchElement switchElement) { if (!(switchElement instanceof GrSwitchStatement)) return false; GrCaseSection[] sections = switchElement.getCaseSections(); return ContainerUtil.and(sections, elem -> elem.getColon() != null); }