public CaseBuilder when(Object when,Object then){
  if (ended) {
    throw new IllegalStateException("Can't call when() after calling end()");
  }
  if (whens == null) {
    whens=new ArrayList<>();
    thens=new ArrayList<>();
  }
  whens.add(when);
  thens.add(then);
  return this;
}

public CaseBuilder when ( Object when , Object then ) { if ( ended ) { throw new IllegalStateException ( "Can't call when() after calling end()" ) ; } if ( whens == null ) { whens = new ArrayList < > ( ) ; thens = new ArrayList < > ( ) ; } whens . add ( when ) ; thens . add ( then ) ; return this ; }
add a when branch to this statement
