public final void addValue ( @ NonNull final String value ) { Condition . INSTANCE . ensureNotNull ( value , "The value may not be null" ) ; if ( this . values != null ) { if ( this . values . add ( value ) ) { if ( persistSet ( this . values ) ) { notifyChanged ( ) ; } } } else { Set < String > newValues = new HashSet <> ( ) ; newValues . add ( value ) ; setValues ( newValues ) ; } }
Adds a new value to the preference . By adding a value the changes will be persisted .