001/* *********************************************************************** * 002 * project: org.matsim.* 003 * Plansgenerator.java 004 * * 005 * *********************************************************************** * 006 * * 007 * copyright : (C) 2007 by the members listed in the COPYING, * 008 * LICENSE and WARRANTY file. * 009 * email : info at matsim dot org * 010 * * 011 * *********************************************************************** * 012 * * 013 * This program is free software; you can redistribute it and/or modify * 014 * it under the terms of the GNU General Public License as published by * 015 * the Free Software Foundation; either version 2 of the License, or * 016 * (at your option) any later version. * 017 * See also COPYING, LICENSE and WARRANTY file * 018 * * 019 * *********************************************************************** */ 020package playground.vsp.analysis.modules.ptTripAnalysis.traveltime; 021 022import java.util.ArrayList; 023import java.util.Collection; 024 025import org.matsim.api.core.v01.population.PlanElement; 026 027import playground.vsp.analysis.modules.ptTripAnalysis.AbstractPlan2TripsFilter; 028 029/** 030 * @author droeder 031 * 032 */ 033public class Plan2TripsFilter extends AbstractPlan2TripsFilter{ 034 035 private Collection<String> networkmodes; 036 private Collection<String> ptModes; 037 038 public Plan2TripsFilter(Collection<String> ptModes, Collection<String> networkModes) { 039 this.ptModes = ptModes; 040 this.networkmodes = networkModes; 041 } 042 043 @Override 044 protected TTAnalysisTrip generateTrip(ArrayList<PlanElement> elements) { 045 TTAnalysisTrip trip = new TTAnalysisTrip(this.ptModes, this.networkmodes); 046 trip.addElements(elements); 047 return trip; 048 } 049 050 051}