package com.sweetzpot.tcxzpot;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Activities implements TCXSerializable {

    public static Activities activities(Activity... activities) {
        return new Activities(activities);
    }

    public static Activities activities(List<Activity> activities) {
        return new Activities(activities);
    }

    private final List<Activity> activities;

    public Activities(List<Activity> activities) {
        this.activities = activities;
    }

    public Activities(Activity... activities) {
        this.activities = new ArrayList<>();
        Collections.addAll(this.activities, activities);
    }

    @Override
    public void serialize(Serializer serializer) {
        serializer.print("<Activities>");
        for(Activity activity : activities) {
            activity.serialize(serializer);
        }
        serializer.print("</Activities>");
    }
}

@@ -25,16 +25,72 @@
 xzpot;%0A%0A
+import com.sweetzpot.tcxzpot.builders.ActivityBuilder;%0A%0A
 import j
@@ -448,24 +448,321 @@
 es);%0A    %7D%0A%0A
+    public static Activities activities(ActivityBuilder... activityBuilders) %7B%0A        List%3CActivity%3E activities = new ArrayList%3C%3E();%0A        for(ActivityBuilder builder : activityBuilders) %7B%0A            activities.add(builder.build());%0A        %7D%0A        return new Activities(activities);%0A    %7D%0A%0A
     private 

Add convenience factory method