001/* *********************************************************************** *
002 * project: org.matsim.*
003 * ProbabilityFilterFactory.java
004 *                                                                         *
005 * *********************************************************************** *
006 *                                                                         *
007 * copyright       : (C) 2013 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 * *********************************************************************** */
020
021package org.matsim.withinday.replanning.identifiers.filter;
022
023import org.matsim.withinday.replanning.identifiers.interfaces.AgentFilterFactory;
024
025public class ProbabilityFilterFactory implements AgentFilterFactory {
026
027        private final double replanningProbability;
028
029        public ProbabilityFilterFactory(double replanningProbability) {
030                this.replanningProbability = replanningProbability;
031        }
032        
033        @Override
034        public ProbabilityFilter createAgentFilter() {
035                return new ProbabilityFilter(replanningProbability);
036        }
037}