Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinMoskala committed Mar 9, 2018
1 parent da04ad8 commit f6bc6a1
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ import kotlin.reflect.jvm.isAccessible

abstract class PreferenceHolder {

protected inline fun <reified T : Any> bindToPreferenceField(default: T, key: String? = null, catching: Boolean = true): ReadWriteProperty<PreferenceHolder, T>
= bindToPreferenceField(T::class, object : TypeToken<T>() {}.type, default, key, catching)
protected inline fun <reified T : Any> bindToPreferenceField(default: T, key: String? = null, caching: Boolean = true): ReadWriteProperty<PreferenceHolder, T>
= bindToPreferenceField(T::class, object : TypeToken<T>() {}.type, default, key, caching)

protected inline fun <reified T : Any> bindToPreferenceFieldNullable(key: String? = null, catching: Boolean = true): ReadWriteProperty<PreferenceHolder, T?>
= bindToPreferenceFieldNullable(T::class, object : TypeToken<T>() {}.type, key, catching)
protected inline fun <reified T : Any> bindToPreferenceFieldNullable(key: String? = null, caching: Boolean = true): ReadWriteProperty<PreferenceHolder, T?>
= bindToPreferenceFieldNullable(T::class, object : TypeToken<T>() {}.type, key, caching)

protected fun <T : Any> bindToPreferenceField(clazz: KClass<T>, type: Type, default: T, key: String?, catching: Boolean = true): ReadWriteProperty<PreferenceHolder, T>
= if (catching) PreferenceFieldBinderCaching(clazz, type, default, key) else PreferenceFieldBinder(clazz, type, default, key)
protected fun <T : Any> bindToPreferenceField(clazz: KClass<T>, type: Type, default: T, key: String?, caching: Boolean = true): ReadWriteProperty<PreferenceHolder, T>
= if (caching) PreferenceFieldBinderCaching(clazz, type, default, key) else PreferenceFieldBinder(clazz, type, default, key)

protected fun <T : Any> bindToPreferenceFieldNullable(clazz: KClass<T>, type: Type, key: String?, catching: Boolean = true): ReadWriteProperty<PreferenceHolder, T?>
= if (catching) PreferenceFieldBinderNullableCaching(clazz, type, key) else PreferenceFieldBinderNullable(clazz, type, key)
protected fun <T : Any> bindToPreferenceFieldNullable(clazz: KClass<T>, type: Type, key: String?, caching: Boolean = true): ReadWriteProperty<PreferenceHolder, T?>
= if (caching) PreferenceFieldBinderNullableCaching(clazz, type, key) else PreferenceFieldBinderNullable(clazz, type, key)

/**
* Function used to clear all SharedPreference and PreferenceHolder data. Useful especially
Expand Down

0 comments on commit f6bc6a1

Please sign in to comment.