WorkInput

@Serializable
class WorkInput

A typed key/value bag passed to a BackgroundWorker at scheduling time.

Size-capped at MAX_SERIALIZED_BYTES (10240 — matching Android androidx.work.Data's hard cap) to keep cross-platform behavior identical.

Construct via of; the constructor validates serialized size.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

true if this input contains no key/value pairs.

Link copied to clipboard
val size: Int

Number of key/value pairs in this input.

Functions

Link copied to clipboard

Read-only view of the underlying map; iteration order is insertion order.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
operator fun get(key: String): WorkValue?

Returns the WorkValue for key, or null if the key is absent.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Snapshot of the keys in this input. Swift-friendly alternative to entries: callers iterate the keys and look up values via get.

Link copied to clipboard
fun toJson(): String

Serialize this input to its compact JSON form. Useful for debugging or manual persistence.

Link copied to clipboard
open override fun toString(): String