public Builder addLeg(Leg leg){
  assertIsNotNull(leg);
  if (!previousElementIsActivity) {
    throw new IllegalStateException("cannot add leg, since last tour element is not an activity.");
  }
  tourElements.add(leg);
  previousElementIsActivity=false;
  return this;
}

public Builder addLeg ( Leg leg ) { assertIsNotNull ( leg ) ; if ( ! previousElementIsActivity ) { throw new IllegalStateException ( "cannot add leg, since last tour element is not an activity." ) ; } tourElements . add ( leg ) ; previousElementIsActivity = false ; return this ; }
adds a leg to the currenttour . < p > consider that a leg follows an activity . otherwise an exception occurs .
