2 * Copyright (C) 2018 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
9 package eu
.etaxonomy
.taxeditor
.bulkeditor
.input
.sortprovider
;
11 import java
.util
.Comparator
;
13 import eu
.etaxonomy
.cdm
.model
.permission
.Group
;
20 public class GroupNameComparator
implements Comparator
<Group
> {
21 private boolean fIgnoreCase
;
26 public int compare(Group o1
, Group o2
) {
27 String groupName0
= o1
.getName();
28 String groupName1
= o2
.getName();
29 if (groupName0
== null && groupName1
== null) {
32 if (groupName0
== null) {
35 if (groupName1
== null) {
38 int result
= fIgnoreCase ? groupName0
.compareToIgnoreCase(groupName1
) :
39 groupName0
.compareTo(groupName1
);
42 result
= o1
.getUuid().compareTo(o2
.getUuid());