src/main/java/de/blau/android/presets/PresetGroup.java
/**
     * Sort the PresetElements in a temporary List and add them to a target List
     * 
     * @param <T> PresetElement sub-class
     * @param target target List
     * @param temp temp List
     */
Sort the PresetElements in a temporary List and add them to a target List

@param  PresetElement sub-class
@param target target List
@param temp temp List
Sort the PresetElements in a temporary List and add them to a target List @param PresetElement sub - class @param target target List @param temp temp List
private <T extends PresetElement> void sortAndAddElements(@NonNull List<PresetElement> target, @NonNull List<T> temp) {
        if (!temp.isEmpty()) {
            Collections.sort(temp, (pe1, pe2) -> pe1.getTranslatedName().compareTo(pe2.getTranslatedName()));
            target.addAll(temp);
            temp.clear();
        }
    }
private < T extends PresetElement > void sortAndAddElements ( @ NonNull List < PresetElement > target , @ NonNull List < T > temp ) { if ( ! temp . isEmpty ( ) ) { Collections . sort ( temp , ( pe1 , pe2 ) -> pe1 . getTranslatedName ( ) . compareTo ( pe2 . getTranslatedName ( ) ) ) ; target . addAll ( temp ) ; temp . clear ( ) ; } }
Sort the PresetElements in a temporary List and add them to a target List
Sort the PresetElements in a temporary List and add them to a target List