Code example for Set

Methods: remove

0
                        if (isChecked) {
                            mPreferenceChanged |= mNewValues
                                    .add(mEntryValues[which].toString());
                        } else { 
                            mPreferenceChanged |= mNewValues
                                    .remove(mEntryValues[which].toString());
                        } 
                    } 
                }); 
        mNewValues.clear();
        mNewValues.addAll(mValues);
    } 
 
    @Override 
    protected Parcelable onSaveInstanceState() {
        final Parcelable superState = super.onSaveInstanceState();
        if (isPersistent()) {
            // No need to save instance state 
            return superState;
        }