MATSIM
HasPlansAndId.java
Go to the documentation of this file.
1 
2 /* *********************************************************************** *
3  * project: org.matsim.*
4  * HasPlansAndId.java
5  * *
6  * *********************************************************************** *
7  * *
8  * copyright : (C) 2019 by the members listed in the COPYING, *
9  * LICENSE and WARRANTY file. *
10  * email : info at matsim dot org *
11  * *
12  * *********************************************************************** *
13  * *
14  * This program is free software; you can redistribute it and/or modify *
15  * it under the terms of the GNU General Public License as published by *
16  * the Free Software Foundation; either version 2 of the License, or *
17  * (at your option) any later version. *
18  * See also COPYING, LICENSE and WARRANTY file *
19  * *
20  * *********************************************************************** */
21 
22  package org.matsim.api.core.v01.population;
23 
24 import java.util.List;
25 
28 
29 public interface HasPlansAndId<T extends BasicPlan, I> extends Identifiable<I>, Attributable {
30 
31  // I added "Attributable". Does not feel like it keeps the interface minimal. However, the subpopulation attribute comes from it, which is used
32  // rather centrally in the StrategyManager stuff, which is the place for which this interface exists. Also so far wasn't totally systematic there
33  // since it was doing something for persons (subpopulation-based strategy) that it was not offering for others, forcing those who use StrategyManager
34  // to implement Attributable seems like an acceptable burden. kai, may'19
35 
42  public abstract List<? extends T> getPlans();
43 
48  public abstract boolean addPlan(T p);
49 
50  public abstract boolean removePlan(T p);
51 
52  public abstract T getSelectedPlan();
53 
54  public abstract void setSelectedPlan(T selectedPlan);
55 
56  public abstract T createCopyOfSelectedPlanAndMakeSelected() ;
57 
58 }
abstract void setSelectedPlan(T selectedPlan)
abstract List<? extends T > getPlans()