src/main/java/de/blau/android/presets/AutoPreset.java
/**
     * Check if this tag found by searching already exists in the Presets
     * 
     * @param sr the SearchResult to check
     * @return true if we already have this
     */
Check if this tag found by searching already exists in the Presets

@param sr the SearchResult to check
@return true if we already have this
Check if this tag found by searching already exists in the Presets @param sr the SearchResult to check @return true if we already have this
private boolean existsInPresets(SearchResult sr) {
        String tag = sr.getKey() + "\t" + sr.getValue();
        for (Preset preset : presets) {
            if (preset != null) {
                Set<PresetItem> existingPresets = preset.getItemByTag(tag);
                if (!existingPresets.isEmpty()) {
                    Log.d(DEBUG_TAG, sr.toString() + " exists in Presets");
                    return true;
                }
            }
        }
        return false;
    }
private boolean existsInPresets ( SearchResult sr ) { String tag = sr . getKey ( ) + "\t" + sr . getValue ( ) ; for ( Preset preset : presets ) { if ( preset != null ) { Set < PresetItem > existingPresets = preset . getItemByTag ( tag ) ; if ( ! existingPresets . isEmpty ( ) ) { Log . d ( DEBUG_TAG , sr . toString ( ) + " exists in Presets" ) ; return true ; } } } return false ; }
Check if this tag found by searching already exists in the Presets
Check if this tag found by searching already exists in the Presets