org.solovyev.android.prefs
Class CollectionSetPreference<C extends Collection<T>,T>
java.lang.Object
org.solovyev.android.prefs.AbstractPreference<C>
org.solovyev.android.prefs.CollectionSetPreference<C,T>
- All Implemented Interfaces:
- Preference<C>
- Direct Known Subclasses:
- HashSetPreference
public abstract class CollectionSetPreference<C extends Collection<T>,T>
- extends AbstractPreference<C>
|
Method Summary |
protected abstract C |
createCollection(int size)
|
protected C |
getPersistedValue(android.content.SharedPreferences preferences)
|
protected void |
putPersistedValue(android.content.SharedPreferences.Editor editor,
C values)
Method saved preference to preferences container editor |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CollectionSetPreference
protected CollectionSetPreference(@Nonnull
String id,
@Nonnull
C defaultValue,
@Nonnull
org.solovyev.common.text.Mapper<T> mapper)
getPersistedValue
protected C getPersistedValue(@Nonnull
android.content.SharedPreferences preferences)
- Specified by:
getPersistedValue in class AbstractPreference<C extends Collection<T>>
- Parameters:
preferences - preferences container
- Returns:
- preference value from preferences with key defined by
AbstractPreference.getKey() method
createCollection
@Nonnull
protected abstract C createCollection(int size)
putPersistedValue
protected void putPersistedValue(@Nonnull
android.content.SharedPreferences.Editor editor,
@Nonnull
C values)
- Description copied from class:
AbstractPreference
- Method saved preference to preferences container editor
- Specified by:
putPersistedValue in class AbstractPreference<C extends Collection<T>>
- Parameters:
editor - editor in which value must be savedvalues - value to be saved
Copyright © 2014 se.solovyev. All Rights Reserved.