boolean (@NotNull Map<Integer, PsiExpression> result, @Nullable PsiExpression condition, @Nullable PsiExpression expression) { if (expression == null) return false; Object thenValue = ExpressionUtils.computeConstantExpression(expression); if (!(thenValue instanceof Integer) || Math.abs((Integer)thenValue) > 1) return false; result.put((Integer)thenValue, condition); return true; }