Class Case

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  Case.CaseElse
      Represents a finalizing `else` expression.
      static interface  Case.CaseEnding
      Specification for a renderable, complete CASE statement
      class  Case.CaseWhenThen
      Represents a pair of `when-then` expressions.
      static class  Case.GenericCase
      Implementation of the Case class to support generic case.
      class  Case.OngoingWhenThen
      Helper class to collect `when` expressions and create Case.CaseWhenThen instances when the `then` is provided.
      static class  Case.SimpleCase
      Special implementation of the Case class to support simple case with an initial expression / condition.
    • Method Detail

      • when

        public Case.OngoingWhenThen when​(Expression nextExpression)
        Creates a new case/when expression with an additional WHEN block.
        Parameters:
        nextExpression - The next expression to use.
        Returns:
        An ongoing when builder.
      • accept

        public void accept​(Visitor visitor)
        Description copied from interface: Visitable
        Accept a Visitor visiting this Visitable and its nested Visitables if applicable.
        Specified by:
        accept in interface Visitable
        Parameters:
        visitor - the visitor to notify, must not be null.