class Rocket
This is the main and only true class of this small project
fun crash(): Unit
Clears all values saved to Shared Preferences |
|
fun drop(vararg key: String): Unit
Removes a number of saved values found by a key |
|
fun readBoolean(key: String, defaultBooleanValue: Boolean = false): Boolean
Reads an Boolean from SharedPreferences. If no value is found the method returns false by default |
|
fun readBooleanAsFlow(key: String, defaultBooleanValue: Boolean = false): Flow<Boolean>
Flow support for getting a Boolean from SharedPreferences |
|
fun readFloat(key: String, defaultFloatValue: Float = 0f): Float
Reads an Float from SharedPreferences. If no value is found the method returns 0f by default |
|
fun readFloatAsFLow(key: String, defaultFloatValue: Float = 0f): Flow<Float>
Flow support for getting a Float from SharedPreferences |
|
fun readInt(key: String, defaultIntValue: Int = 0): Int
Reads an Int from SharedPreferences. If no value is found the method returns 0 by default |
|
fun readIntAsFlow(key: String, defaultIntValue: Int = 0): Flow<Int>
Flow support for getting and Int from SharedPreferences. If no value is found the method emits 0 by default |
|
fun readLong(key: String, defaultLongValue: Long = 0L): Long
Reads an Long from SharedPreferences. If no value is found the method returns 0L by default |
|
fun readLongAsFlow(key: String, defaultLongValue: Long = 0L): Flow<Long>
Flow support for getting a Log value from SharedPreferences |
|
fun readSet(key: String, defaultSetValue: MutableSet<String> = mutableSetOf()): MutableSet<String>
Reads an Long from SharedPreferences. If no value is found the method returns 0L by default |
|
fun readSetAsFlow(key: String): Flow<String>
Flow support for getting a stream Flow |
|
fun readString(key: String, defaultStringValue: String = ""): String
Reads a String from SharedPreferences |
|
fun readStringAsFlow(key: String, defaultStringValue: String = ""): Flow<String>
Flow support for getting a String value from SharedPreferences |
|
fun writeBoolean(key: String, value: Boolean): Unit
Writes a Boolean to SharedPreferences |
|
fun writeFloat(key: String, value: Float): Unit
Writes a Float to SharedPreferences |
|
fun writeInt(key: String, value: Int): Unit
Writes a Int to SharedPreferences |
|
fun writeLong(key: String, value: Long): Unit
Writes a Long value to SharedPreferences |
|
fun writeSet(key: String, value: MutableSet<String>): Unit
Writes a MutableSet to SharedPreferences |
|
fun writeString(key: String, value: String): Unit
Writes a String to SharedPreferences |
fun launch(context: Context, fileName: String, mode: Int = Context.MODE_PRIVATE): Rocket
Method for starting the Rocket's instance. |