public final void addAllValues ( @ NonNull final Collection < String > values ) { Condition . INSTANCE . ensureNotNull ( values , "The values may not be null" ) ; if ( this . values != null ) { if ( this . values . addAll ( values ) ) { if ( persistSet ( this . values ) ) { notifyChanged ( ) ; } } } else { Set < String > newValues = new HashSet <> ( values ) ; setValues ( newValues ) ; } }
Adds all values which are contained by a specific collection to the preference . By adding values the changes will be persisted .