code: private boolean persistSet(@Nullable final Set<String> set) {
          if (set != null && shouldPersist()) {
              if (set.equals(getPersistedSet(null))) {
                  return true;
              }
  
              Editor editor = getPreferenceManager().getSharedPreferences().edit();
              editor.putStringSet(getKey(), set);
              editor.apply();
              return true;
          }
  
          return false;
      }
docs: Persists a specific set in the shared preferences by using the preference's key.
  
  @param set
  The set, which should be persisted, as an instance of the type {@link Set}
  @return True, if the given set has been persisted, false otherwise