Interface CtSwitchExpression<T,​S>

Type Parameters:
T - the type of the switch expression
S - the type of the selector expression (it would be better to be able to define an upper bound, but it is not possible because of Java's type hierarchy, especially since the enums that make things even worse!)
All Superinterfaces:
Cloneable, CtAbstractSwitch<S>, CtCodeElement, CtElement, CtExpression<T>, CtQueryable, CtTypedElement<T>, CtVisitable, FactoryAccessor, Serializable, SourcePositionHolder, TemplateParameter<T>
All Known Implementing Classes:
CtSwitchExpressionImpl

public interface CtSwitchExpression<T,​S> extends CtExpression<T>, CtAbstractSwitch<S>
This code element defines a switch expression. Example:
 int i = 0;
 int x = switch(i) { // <-- switch expression
     case 1 -> 10;
     case 2 -> 20;
     default -> 30;
 };