All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opentripplanner.api.model.TimeSurfaceShort Maven / Gradle / Ivy

package org.opentripplanner.api.model;

import com.google.common.collect.Lists;
import org.opentripplanner.analyst.TimeSurface;
import org.opentripplanner.routing.core.RoutingRequest;

import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * API data model object briefly describing a time surface.
 */
public class TimeSurfaceShort {

    public int id;
    public Map params;

    public TimeSurfaceShort(TimeSurface surface) {
        this.id = surface.id;
        this.params = surface.params;
    }

    public static List list (Collection in) {
        List out = Lists.newArrayList();
        for (TimeSurface surface : in) {
            out.add(new TimeSurfaceShort(surface));
        }
        return out;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy