Revision ad7201d3
Added by Andreas Müller about 3 years ago
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/sortprovider/AbstractSortProvider.java | ||
---|---|---|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
9 |
|
|
10 | 9 |
package eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider; |
11 | 10 |
|
12 | 11 |
import java.util.Comparator; |
... | ... | |
19 | 18 |
/** |
20 | 19 |
* @author n.hoffmann |
21 | 20 |
* @created Dec 14, 2010 |
22 |
* @version 1.0 |
|
23 | 21 |
*/ |
24 | 22 |
public class AbstractSortProvider<T> implements IBulkEditorSortProvider<T> { |
25 | 23 |
|
26 |
Map<String, Comparator<T>> comparators = new HashMap<String, Comparator<T>>();
|
|
24 |
protected Map<String, Comparator<T>> comparators = new HashMap<>();
|
|
27 | 25 |
|
28 |
/* (non-Javadoc) |
|
29 |
* @see eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider#getComparators() |
|
30 |
*/ |
|
31 | 26 |
@Override |
32 | 27 |
public Map<String, Comparator<T>> getComparators() { |
33 | 28 |
return comparators; |
34 | 29 |
} |
35 | 30 |
|
36 |
/* (non-Javadoc) |
|
37 |
* @see eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider#getComparatorNames() |
|
38 |
*/ |
|
39 | 31 |
@Override |
40 | 32 |
public Set<String> getComparatorNames() { |
41 | 33 |
return comparators.keySet(); |
42 | 34 |
} |
43 | 35 |
|
44 |
/* (non-Javadoc) |
|
45 |
* @see eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider#getComparatorByName(java.lang.String) |
|
46 |
*/ |
|
47 | 36 |
@Override |
48 | 37 |
public Comparator<T> getComparatorByName(String name) { |
49 | 38 |
return comparators.get(name); |
50 | 39 |
} |
51 |
|
|
52 |
} |
|
40 |
} |
Also available in: Unified diff
cleanup and generics for ICdmEntitySessionEnabled