Revision 1b70bad3
Added by Andreas Kohlbecker almost 8 years ago
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/description/TransmissionEngineDistribution.java | ||
---|---|---|
232 | 232 |
} |
233 | 233 |
|
234 | 234 |
/** |
235 |
* Compares the PresenceAbsenceTermBase terms <code>a</code> and <code>b</code> and |
|
236 |
* returns the PresenceAbsenceTermBase with the higher priority as stored in the statusPriorityMap. |
|
235 |
* Compares the PresenceAbsenceTermBase terms <code>a</code> and <code>b</code> after |
|
236 |
* the priority as stored in the statusPriorityMap. The PresenceAbsenceTermBase with |
|
237 |
* the higher priority is returned. a well be returned if a == b, |
|
237 | 238 |
* If either a or b are null b or a is returned. |
238 | 239 |
* |
239 | 240 |
* @see initializeStatusPriorityMap() |
... | ... | |
263 | 264 |
logger.warn("No priority found in map for " + b.getLabel()); |
264 | 265 |
return a; |
265 | 266 |
} |
266 |
if(statusPriorityMap.get(a) > statusPriorityMap.get(b)){ |
|
267 |
return a; |
|
268 |
} else { |
|
267 |
if(statusPriorityMap.get(a) < statusPriorityMap.get(b)){ |
|
269 | 268 |
return b; |
269 |
} else { |
|
270 |
return a; |
|
270 | 271 |
} |
271 | 272 |
} |
272 | 273 |
|
Also available in: Unified diff
TransmissionEngine: modification to status compare function for case a==b