Revision 20cbb1bf
Added by Andreas Müller over 1 year ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/TermManager.java | ||
---|---|---|
100 | 100 |
public <T extends DefinedTermBase> List<T> getPreferredTerms(TermVocabulary<T> termVocabulary, |
101 | 101 |
Comparator comp){ |
102 | 102 |
if (comp == null){ |
103 |
comp = new DefaultTermComparator<T>();
|
|
103 |
comp = new DefaultTermComparator<>(); |
|
104 | 104 |
} |
105 | 105 |
@SuppressWarnings("unchecked") |
106 |
List<T> terms = cachedTermMap.get(termVocabulary.getUuid()); |
|
106 |
List<T> terms = cachedTermMap.get(termVocabulary.getUuid());
|
|
107 | 107 |
List<T> termBaseList = new ArrayList<>(); |
108 | 108 |
if(terms==null){ |
109 |
termBaseList = getFilteredTerms(new ArrayList<T>(TermStore.getTerms(termVocabulary, comp)));
|
|
109 |
termBaseList = getFilteredTerms(new ArrayList<>(TermStore.getTerms(termVocabulary, comp))); |
|
110 | 110 |
cachedTermMap.put(termVocabulary.getUuid(), termBaseList); |
111 | 111 |
}else{ |
112 | 112 |
Iterator<?> iterator = terms.iterator(); |
Also available in: Unified diff
cleanup