package org.zwobble.couscous.ast.sugar; import org.zwobble.couscous.ast.ExpressionNode; import org.zwobble.couscous.ast.StatementNode; import java.util.List; import java.util.Optional; public class SwitchCaseNode { public static SwitchCaseNode switchCase(Optional value, List statements) { return new SwitchCaseNode(value, statements); } private final Optional value; private final List statements; public SwitchCaseNode(Optional value, List statements) { this.value = value; this.statements = statements; } public boolean isDefault() { return !value.isPresent(); } public Optional getValue() { return value; } public List getStatements() { return statements; } }