code: public Expression when(Expression condition) {
          StringBuilder updateFor = new StringBuilder("FOR ");
          for (Expression var : vars) {
              updateFor.append(var.toString()).append(", ");
          }
          updateFor.delete(updateFor.length() - 2, updateFor.length());
          if (condition != null) {
              updateFor.append(" WHEN ").append(condition.toString());
          }
          updateFor.append(" END");
          return x(updateFor.toString());
      }
docs: Terminates the clause by adding a condition to it ("<code>WHEN condition END</code>") and
  returns the corresponding {@link Expression}.
  
  @param condition the condition to add to the clause, in a WHEN section.
  @return the {@link Expression} representing the updateFor clause.
  @see #end() if you don't need a condition.