243244245246247248249250251252253
switch (type) { case UserDefined: newLayer = new UserDefinedTrafficDefinitionLayer(); break; case ActivityBased: newLayer = new ActivityBasedTrafficDefinitionLayer(); break; case Random: newLayer = new RandomTrafficDefinitionLayer(); break; }