src/main/java/de/blau/android/presets/PresetElement.java
/**
     * Filter a List of PresetElement by region
     * 
     * @param elements the input PresetElements
     * @param region the region
     * @return a List of PresetElement, potentially empty
     */
Filter a List of PresetElement by region

@param elements the input PresetElements
@param region the region
@return a List of PresetElement, potentially empty
Filter a List of PresetElement by region @param elements the input PresetElements @param region the region @return a List of PresetElement potentially empty
@NonNull
    protected static List<PresetElement> filterElementsByRegion(@NonNull List<PresetElement> elements, @Nullable String region) {
        List<PresetElement> result = new ArrayList<>();
        for (PresetElement pe : elements) {
            if (pe.appliesIn(region)) {
                result.add(pe);
            }
        }
        return result;
    }
@ NonNull protected static List < PresetElement > filterElementsByRegion ( @ NonNull List < PresetElement > elements , @ Nullable String region ) { List < PresetElement > result = new ArrayList < > ( ) ; for ( PresetElement pe : elements ) { if ( pe . appliesIn ( region ) ) { result . add ( pe ) ; } } return result ; }
Filter a List of PresetElement by region
Filter a List of PresetElement by region