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;
}
}