Project

General

Profile

Download (1.33 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2007 EDIT
4
* European Distributed Institute of Taxonomy 
5
* http://www.e-taxonomy.eu
6
* 
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10

    
11
package eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider;
12

    
13
import java.util.Comparator;
14
import java.util.HashMap;
15
import java.util.Map;
16
import java.util.Set;
17

    
18
import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider;
19

    
20
/**
21
 * @author n.hoffmann
22
 * @created Dec 14, 2010
23
 * @version 1.0
24
 */
25
public class AbstractSortProvider<T> implements IBulkEditorSortProvider<T> {
26

    
27
	Map<String, Comparator<T>> comparators = new HashMap<String, Comparator<T>>();
28
	
29
	/* (non-Javadoc)
30
	 * @see eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider#getComparators()
31
	 */
32
	@Override
33
	public Map<String, Comparator<T>> getComparators() {
34
		return comparators;
35
	}
36

    
37
	/* (non-Javadoc)
38
	 * @see eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider#getComparatorNames()
39
	 */
40
	@Override
41
	public Set<String> getComparatorNames() {
42
		return comparators.keySet();
43
	}
44

    
45
	/* (non-Javadoc)
46
	 * @see eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider#getComparatorByName(java.lang.String)
47
	 */
48
	@Override
49
	public Comparator<T> getComparatorByName(String name) {
50
		return comparators.get(name);
51
	}
52

    
53
}
(2-2/6)