/*

Copyright 2015 Akexorcist

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

*/

package com.akexorcist.googledirection.request;

import com.google.android.gms.maps.model.LatLng;

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

/**
 * Created by Akexorcist on 11/29/15 AD.
 */
public class DirectionDestinationRequest {
    String apiKey;
    LatLng origin;
    List<LatLng> waypointList;

    public DirectionDestinationRequest(String apiKey, LatLng origin) {
        this.apiKey = apiKey;
        this.origin = origin;
    }

    public DirectionDestinationRequest and(LatLng waypoint) {
        if (waypointList == null) {
            waypointList = new ArrayList<>();
        }
        waypointList.add(waypoint);
        return this;
    }

    public DirectionRequest to(LatLng destination) {
        return new DirectionRequest(apiKey, origin, destination, waypointList);
    }
}

@@ -796,16 +796,24 @@
 t %7B%0A    
+private 
 String a
@@ -823,16 +823,24 @@
 ey;%0A    
+private 
 LatLng o
@@ -850,16 +850,24 @@
 in;%0A    
+private 
 List%3CLat
@@ -1234,32 +1234,282 @@
 rn this;%0A    %7D%0A%0A
+    public DirectionDestinationRequest and(List%3CLatLng%3E waypointList) %7B%0A        if (this.waypointList == null) %7B%0A            this.waypointList = new ArrayList%3C%3E();%0A        %7D%0A        this.waypointList.addAll(waypointList);%0A        return this;%0A    %7D%0A%0A
     public Direc

Add LatLng list support for direction request