Code example for CopyOnWriteArrayList

Methods: addremove

0
        return new MyEditor(); 
    } 
 
    @Override 
    public void registerOnSharedPreferenceChangeListener(OnSharedPreferenceChangeListener listener) {
        mListeners.add(listener);
    } 
 
    @Override 
    public void unregisterOnSharedPreferenceChangeListener(OnSharedPreferenceChangeListener listener) {
        mListeners.remove(listener);
    } 
 // This method is not used. 
    @Override 
    public Set<String> getStringSet(String arg0, Set<String> arg1) {
        throw new UnsupportedOperationException();
    } 
     
    private class MyEditor implements Editor{
 
        private Editor mEditorGlobal;