MutablePreferences

public final class MutablePreferences extends Preferences

Object
   ↳ Preferences
     ↳ MutablePreferences

Mutable version of Preferences. Allows for creating Preferences with different key-value pairs.

Summary

Public methods

@NonNull Map<@NonNull Preferences.Key<@NonNull ?>, @NonNull Object>

Retrieve a map of all key preference pairs.

final void
boolean
<T extends Object> contains(Preferences.Key<T> key)

Returns true if this Preferences contains the specified key.

boolean
equals(Object other)
T
<T extends Object> get(Preferences.Key<T> key)

Get a preference with a key.

int
final void

Removes the preference with the given key from this MutablePreferences.

final void

Appends or replaces all pairs from prefs to this MutablePreferences.

final void

Appends or replaces all pair to this MutablePreferences.

final void

Appends or replaces all pairs to this MutablePreferences.

final @NonNull T
<T extends Object> remove(Preferences.Key<T> key)

Remove a preferences from this MutablePreferences.

final void
<T extends Object> set(Preferences.Key<T> key, T value)

Set a key value pair in MutablePreferences.

@NonNull String

For better debugging.

Inherited methods

From class Preferences