View Javadoc

1   /*
2    * Copyright (C) 2010 Unreal Visualizer Authors
3    *
4    * This program is free software: you can redistribute it and/or modify
5    * it under the terms of the GNU General Public License as published by
6    * the Free Software Foundation, either version 3 of the License, or
7    * (at your option) any later version.
8    *
9    * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   * GNU General Public License for more details.
13   *
14   * You should have received a copy of the GNU General Public License
15   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16   */
17  package nl.tudelft.goal.ut2004.visualizer.util;
18  
19  import java.util.Collection;
20  
21  import cz.cuni.amis.utils.collections.CollectionEventListener;
22  
23  /**
24   * Adaptor for the CollectionEventListener. Limits the number of methods that need to be implemented.
25   * 
26   * @author M.P. Korstanje
27   * 
28   * @param <T>
29   */
30  public abstract class CollectionEventAdaptor<T> implements
31  		CollectionEventListener<T> { 
32  
33  	@Override
34  	public void postAddEvent(Collection<T> alreadyAdded,
35  			Collection<T> whereWereAdded) {
36  	}
37  
38  	@Override
39  	public void postRemoveEvent(Collection<T> alreadyRemoved,
40  			Collection<T> whereWereRemoved) {
41  	}
42  
43  	@Override
44  	public void preAddEvent(Collection<T> toBeAdded, Collection<T> whereToAdd) {
45  
46  	}
47  
48  	@Override
49  	public void preRemoveEvent(Collection<T> toBeRemoved,
50  			Collection<T> whereToRemove) {
51  
52  	}
53  
54  }