src/main/java/de/blau/android/presets/Preset.java
/**
     * Recursively descend the Preset, starting at group and try to find the item
     * 
     * @param group the starting PresetGroup
     * @param item the PresetItem
     * @return true if found
     */
Recursively descend the Preset, starting at group and try to find the item

@param group the starting PresetGroup
@param item the PresetItem
@return true if found
Recursively descend the Preset starting at group and try to find the item @param group the starting PresetGroup @param item the PresetItem @return true if found
private boolean contains(@NonNull PresetGroup group, @NonNull PresetItem item) {
        for (PresetElement element : group.getElements()) {
            if (element.equals(item)) {
                return true;
            } else if (element instanceof PresetGroup) {
                boolean found = contains((PresetGroup) element, item);
                if (found) {
                    return true;
                }
            }
        }
        return false;
    }
private boolean contains ( @ NonNull PresetGroup group , @ NonNull PresetItem item ) { for ( PresetElement element : group . getElements ( ) ) { if ( element . equals ( item ) ) { return true ; } else if ( element instanceof PresetGroup ) { boolean found = contains ( ( PresetGroup ) element , item ) ; if ( found ) { return true ; } } } return false ; }
Recursively descend the Preset, starting at group and try to find the item
Recursively descend the Preset starting at group and try to find the item