MapBoomerang

A platform-agnostic implementation of the Boomerang interface that uses a MutableMap for storage.

This implementation is used on iOS and Desktop platforms, providing a consistent API across all platforms while using platform-appropriate storage mechanisms.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun clear()

Removes all values from this Boomerang instance.

Link copied to clipboard
open override fun contains(key: String): Boolean

Checks if a value exists for the given key.

Link copied to clipboard
open override fun getBoolean(key: String): Boolean?

Retrieves a Boolean value for the given key.

Link copied to clipboard
open override fun getBoomerang(key: String): Boomerang?

Retrieves a Boomerang instance for the given key.

Link copied to clipboard
open override fun getBoomerangsList(key: String): List<Boomerang>?

Retrieves a list of Boomerang instances for the given key.

Link copied to clipboard
fun Boomerang.getBundle(key: String): Bundle?

Retrieves an Android Bundle from the Boomerang with the given key.

Link copied to clipboard
open override fun getByte(key: String): Byte?

Retrieves a Byte value for the given key.

Link copied to clipboard
open override fun getByteArray(key: String): ByteArray?

Retrieves a ByteArray value for the given key.

Link copied to clipboard
open override fun getChar(key: String): Char?

Retrieves a Char value for the given key.

Link copied to clipboard
open override fun getDouble(key: String): Double?

Retrieves a Double value for the given key.

Link copied to clipboard
open override fun getFloat(key: String): Float?

Retrieves a Float value for the given key.

Link copied to clipboard
open override fun getInt(key: String): Int?

Retrieves an Int value for the given key.

Link copied to clipboard

Retrieves a Java Serializable object from the Boomerang with the given key.

Link copied to clipboard
open override fun getKeys(): Set<String>

Gets all keys in this Boomerang instance.

Link copied to clipboard
open override fun getLong(key: String): Long?

Retrieves a Long value for the given key.

Link copied to clipboard
inline fun <T : Parcelable> Boomerang.getParcelable(key: String): T?

Retrieves a Parcelable object from the Boomerang with the given key.

Link copied to clipboard
open override fun getShort(key: String): Short?

Retrieves a Short value for the given key.

Link copied to clipboard
open override fun getString(key: String): String?

Retrieves a String value for the given key.

Link copied to clipboard
open override fun putBoolean(key: String, value: Boolean)

Stores a Boolean value with the given key.

Link copied to clipboard
open override fun putBoomerang(key: String, boomerang: Boomerang)

Stores a Boomerang instance with the given key. This allows for nested data structures.

Link copied to clipboard
open override fun putBoomerangsList(key: String, boomerangs: List<Boomerang>)

Stores a list of Boomerang instances with the given key. This allows for storing collections of nested data structures.

Link copied to clipboard
fun Boomerang.putBundle(key: String, value: Bundle)

Stores an Android Bundle in the Boomerang with the given key.

Link copied to clipboard
open override fun putByte(key: String, value: Byte)

Stores a Byte value with the given key.

Link copied to clipboard
open override fun putByteArray(key: String, value: ByteArray)

Stores a ByteArray value with the given key.

Link copied to clipboard
open override fun putChar(key: String, value: Char)

Stores a Char value with the given key.

Link copied to clipboard
open override fun putDouble(key: String, value: Double)

Stores a Double value with the given key.

Link copied to clipboard
open override fun putFloat(key: String, value: Float)

Stores a Float value with the given key.

Link copied to clipboard
open override fun putInt(key: String, value: Int)

Stores an Int value with the given key.

Link copied to clipboard

Stores a Java Serializable object in the Boomerang with the given key.

Link copied to clipboard
open override fun putLong(key: String, value: Long)

Stores a Long value with the given key.

Link copied to clipboard
fun <T : Parcelable> Boomerang.putParcelable(key: String, value: T)

Stores a Parcelable object in the Boomerang with the given key.

Link copied to clipboard
open override fun putShort(key: String, value: Short)

Stores a Short value with the given key.

Link copied to clipboard
open override fun putString(key: String, value: String)

Stores a String value with the given key.

Link copied to clipboard
open override fun remove(key: String)

Removes the value for the given key.

Link copied to clipboard
fun Boomerang.toBundle(): Bundle

Converts a Boomerang to an Android Bundle.