public abstract class AbstractPrefField<T> extends Object
Modifier and Type | Field and Description |
---|---|
protected T |
defaultValue |
protected String |
key |
protected android.content.SharedPreferences |
sharedPreferences |
Constructor and Description |
---|
AbstractPrefField(android.content.SharedPreferences sharedPreferences,
String key,
T defaultValue) |
Modifier and Type | Method and Description |
---|---|
protected void |
apply(android.content.SharedPreferences.Editor editor) |
protected android.content.SharedPreferences.Editor |
edit() |
boolean |
exists() |
T |
get() |
abstract T |
getOr(T defaultValue) |
String |
key() |
void |
put(T value) |
protected abstract void |
putInternal(T value) |
void |
remove() |
protected final T defaultValue
protected final android.content.SharedPreferences sharedPreferences
protected final String key
public final boolean exists()
public String key()
public final T get()
public final void put(T value)
protected abstract void putInternal(T value)
public final void remove()
protected android.content.SharedPreferences.Editor edit()
protected final void apply(android.content.SharedPreferences.Editor editor)
Copyright © 2010-2015. All Rights Reserved.