fm/fmapp2/src/com/caf/fmradio/PresetList.java
public synchronized boolean sameStationExists(PresetStation compareStation){
        int totalPresets = mPresetList.size();
        if (compareStation != null) {
            for (int presetNum = 0; presetNum < totalPresets; presetNum++ ) {
                PresetStation station = mPresetList.get(presetNum);
                if (station != null) {
                    if(compareStation.getFrequency() == station.getFrequency()) {
                        return true;
                    }
                }
            }
        }
        return false;
    }
/* Check if the same station already exists in a List
     * to update the list.
     */
Check if the same station already exists in a List
to update the list.
Check if the same station already exists in a List to update the list .
public synchronized boolean sameStationExists(PresetStation compareStation){
        int totalPresets = mPresetList.size();
        if (compareStation != null) {
            for (int presetNum = 0; presetNum < totalPresets; presetNum++ ) {
                PresetStation station = mPresetList.get(presetNum);
                if (station != null) {
                    if(compareStation.getFrequency() == station.getFrequency()) {
                        return true;
                    }
                }
            }
        }
        return false;
    }
public synchronized boolean sameStationExists ( PresetStation compareStation ) { int totalPresets = mPresetList . size ( ) ; if ( compareStation != null ) { for ( int presetNum = 0 ; presetNum < totalPresets ; presetNum ++ ) { PresetStation station = mPresetList . get ( presetNum ) ; if ( station != null ) { if ( compareStation . getFrequency ( ) == station . getFrequency ( ) ) { return true ; } } } } return false ; }
Check if the same station already exists in a List
 to update the list.
Check if the same station already exists in a List to update the list .