/**
 * Define a part of an itinerary from one main place to another main place
 * The structure authorizes for a unique way through the places
 * or till n to n
 * A cohesion between every leg inside an array should be considered
 * in order to avoid holes
 */
export class Leg {
    constructor() {
        this.fromId = '';
        this.toId = '';
        this.time = 0;
        this.length = 0;
        this.itineraryWaypoints = [][0];
        this.contents = [];
        this.maneuvers = [];
        this.waypoints = [];
    }
    ////////////////////////////////////////////////////////////////
    //  Factory
    ////////////////////////////////////////////////////////////////
    /**
     * Create a leg
     * @param fromId
     * @param toId
     * @return the created leg
     */
    static make(fromId, toId) {
        let leg = new Leg();
        leg.fromId = fromId;
        leg.toId = toId;
        return leg;
    }
}
