package com.google.maps.android.data.kml;

import com.google.maps.android.data.Geometry;

import java.util.ArrayList;

/**
 * Created by thorin on 22/02/2017.
 */

public class KmlMultiTrack extends KmlMultiGeometry {
    /**
     * Creates a new MultiGeometry object
     *
     * @param tracks array of KmlTrack objects contained in the MultiGeometry
     */
    public KmlMultiTrack(ArrayList<KmlTrack> tracks) {
        super(createGeometries(tracks));
    }

    private static ArrayList<Geometry> createGeometries(ArrayList<KmlTrack> tracks) {
        ArrayList <Geometry> geometries = new ArrayList<>();

        for (KmlTrack track : tracks) {
            geometries.add(track);
        }

        return geometries;
    }
}

@@ -624,24 +624,142 @@
 ist%3C%3E();%0D%0A%0D%0A
+        if (tracks == null) %7B%0D%0A            throw new IllegalArgumentException(%22Tracks cannot be null%22);%0D%0A        %7D%0D%0A%0D%0A
         for 

Throw IllegalArgumentException if constructor is called with a null argument