@NonNull
        public Comparator<Object> getItemGroupComparator() {
            final boolean hasItemGroupComparator = itemGroupComparator != null;

            final Comparator<G> gComparator = hasItemGroupComparator ? null : this.groupComparator != null ? this.groupComparator : CommonUtils.getTextSortingComparator(Objects::toString);
            final Comparator<T> tComparator = hasItemGroupComparator ? null : CommonUtils.getListSortingComparator(null, true, getItems());

            return CommonUtils.getNullHandlingComparator((o1, o2) -> {

                if (hasItemGroupComparator) {
                    return itemGroupComparator.compare(o1, o2);
                }

                final boolean o1IsGroup = o1 instanceof ItemGroup;
                final boolean o2IsGroup = o2 instanceof ItemGroup;
                if (o1IsGroup != o2IsGroup) {
                    return this.sortGroupsBeforeItems ^ o1IsGroup ? -1 : 1;
                }
                if (o1IsGroup) {
                    return gComparator.compare(((ItemGroup<T, G>) o1).getGroup(), ((ItemGroup<T, G>) o2).getGroup());
                }
                return tComparator.compare((T) o1, (T) o2);
            }, true);
        }
Sets a mapper providing an optional display icon per group
main/src/main/java/cgeo/geocaching/ui/SimpleItemListModel.java