Merge branch 'release/5.19.0'
[taxeditor.git] / eu.etaxonomy.taxeditor.bulkeditor / src / main / java / eu / etaxonomy / taxeditor / bulkeditor / input / sortprovider / AbstractSortProvider.java
1 /**
2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9 package eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider;
10
11 import java.util.Comparator;
12 import java.util.HashMap;
13 import java.util.Map;
14 import java.util.Set;
15
16 import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider;
17
18 /**
19 * @author n.hoffmann
20 * @created Dec 14, 2010
21 */
22 public class AbstractSortProvider<T> implements IBulkEditorSortProvider<T> {
23
24 protected Map<String, Comparator<T>> comparators = new HashMap<>();
25
26 @Override
27 public Map<String, Comparator<T>> getComparators() {
28 return comparators;
29 }
30
31 @Override
32 public Set<String> getComparatorNames() {
33 return comparators.keySet();
34 }
35
36 @Override
37 public Comparator<T> getComparatorByName(String name) {
38 return comparators.get(name);
39 }
40 }