Interface JSwitch

All Superinterfaces:
JCommentable, JStatement

public interface JSwitch extends JStatement
A switch statement.
Author:
David M. Lloyd
  • Method Details

    • _case

      JBlock _case(JExpr expr)
      Add a switch case.
      Parameters:
      expr - the case expression
      Returns:
      a sub-block for the case logic
    • _case

      JBlock _case(String constName)
      Add a switch case for an enum constant.
      Parameters:
      constName - the constant name
      Returns:
      a sub-block for the case logic
    • _default

      JBlock _default()
      Add the default block.
      Returns:
      the default sub-block