Builder
class Builder
kotlin.Any | |
↳ | androidx.work.Data.Builder |
A builder for Data
.
Summary
Public constructors | |
---|---|
<init>() |
Public methods | |
---|---|
Data.Builder! |
Puts a double into the arguments. |
Data.Builder! |
putIntArray(key: String!, value: IntArray!) Puts an integer array into the arguments. |
Data.Builder! |
Puts a long into the arguments. |
Data.Builder! |
putStringArray(key: String!, value: Array<String!>!) Puts a String array into the arguments. |
Data.Builder! |
Puts an integer into the arguments. |
Data.Builder! |
putBoolean(key: String!, value: Boolean) Puts a boolean into the arguments. |
Data.Builder! |
Puts all input key-value pairs from the |
Data.Builder! |
putAll(values: MutableMap<String!, Any!>!) Puts all input key-value pairs into the Builder. |
Data! |
build() Builds an |
Data.Builder! |
putBooleanArray(key: String!, value: BooleanArray!) Puts a boolean array into the arguments. |
Data.Builder! |
putFloatArray(key: String!, value: FloatArray!) Puts a float array into the arguments. |
Data.Builder! |
Puts a float into the arguments. |
Data.Builder! |
putDoubleArray(key: String!, value: DoubleArray!) Puts a double array into the arguments. |
Data.Builder! |
putLongArray(key: String!, value: LongArray!) Puts a long array into the arguments. |
Data.Builder! |
Puts a String into the arguments. |
Public constructors
<init>
Builder()
Public methods
putDouble
fun putDouble(key: String!, value: Double): Data.Builder!
Puts a double into the arguments.
Parameters | |
---|---|
key |
String!: The key for this argument |
value |
String!: The value for this argument |
Return | |
---|---|
Data.Builder!: The Builder |
putIntArray
fun putIntArray(key: String!, value: IntArray!): Data.Builder!
Puts an integer array into the arguments.
Parameters | |
---|---|
key |
String!: The key for this argument |
value |
String!: The value for this argument |
Return | |
---|---|
Data.Builder!: The Builder |
putLong
fun putLong(key: String!, value: Long): Data.Builder!
Puts a long into the arguments.
Parameters | |
---|---|
key |
String!: The key for this argument |
value |
String!: The value for this argument |
Return | |
---|---|
Data.Builder!: The Builder |
putStringArray
fun putStringArray(key: String!, value: Array<String!>!): Data.Builder!
Puts a String array into the arguments.
Parameters | |
---|---|
key |
String!: The key for this argument |
value |
String!: The value for this argument |
Return | |
---|---|
Data.Builder!: The Builder |
putInt
fun putInt(key: String!, value: Int): Data.Builder!
Puts an integer into the arguments.
Parameters | |
---|---|
key |
String!: The key for this argument |
value |
String!: The value for this argument |
Return | |
---|---|
Data.Builder!: The Builder |
putBoolean
fun putBoolean(key: String!, value: Boolean): Data.Builder!
Puts a boolean into the arguments.
Parameters | |
---|---|
key |
String!: The key for this argument |
value |
String!: The value for this argument |
Return | |
---|---|
Data.Builder!: The Builder |
putAll
fun putAll(data: Data): Data.Builder!
Puts all input key-value pairs from the Data
into the Builder. Any non-valid types will be logged and ignored. Valid types are: Boolean, Integer, Long, Double, String, and array versions of each of those types. Any null
values will also be ignored.
Parameters | |
---|---|
data |
Data: Data containing key-value pairs to add |
Return | |
---|---|
Data.Builder!: The Builder |
putAll
fun putAll(values: MutableMap<String!, Any!>!): Data.Builder!
Puts all input key-value pairs into the Builder. Valid types are: Boolean, Integer, Long, Float, Double, String, and array versions of each of those types. Invalid types throw an IllegalArgumentException
.
Parameters | |
---|---|
values |
MutableMap<String!, Any!>!: A Map of key-value pairs to add |
Return | |
---|---|
Data.Builder!: The Builder |
build
fun build(): Data!
Builds an Data
object.
Return | |
---|---|
Data!: The Data object containing all key-value pairs specified by this Builder . |
putBooleanArray
fun putBooleanArray(key: String!, value: BooleanArray!): Data.Builder!
Puts a boolean array into the arguments.
Parameters | |
---|---|
key |
String!: The key for this argument |
value |
String!: The value for this argument |
Return | |
---|---|
Data.Builder!: The Builder |
putFloatArray
fun putFloatArray(key: String!, value: FloatArray!): Data.Builder!
Puts a float array into the arguments.
Parameters | |
---|---|
key |
String!: The key for this argument |
value |
String!: The value for this argument |
Return | |
---|---|
Data.Builder!: The Builder |
putFloat
fun putFloat(key: String!, value: Float): Data.Builder!
Puts a float into the arguments.
Parameters | |
---|---|
key |
String!: The key for this argument |
value |
String!: The value for this argument |
Return | |
---|---|
Data.Builder!: The Builder |
putDoubleArray
fun putDoubleArray(key: String!, value: DoubleArray!): Data.Builder!
Puts a double array into the arguments.
Parameters | |
---|---|
key |
String!: The key for this argument |
value |
String!: The value for this argument |
Return | |
---|---|
Data.Builder!: The Builder |
putLongArray
fun putLongArray(key: String!, value: LongArray!): Data.Builder!
Puts a long array into the arguments.
Parameters | |
---|---|
key |
String!: The key for this argument |
value |
String!: The value for this argument |
Return | |
---|---|
Data.Builder!: The Builder |
putString
fun putString(key: String!, value: String!): Data.Builder!
Puts a String into the arguments.
Parameters | |
---|---|
key |
String!: The key for this argument |
value |
String!: The value for this argument |
Return | |
---|---|
Data.Builder!: The Builder |
Interfaces
Classes
- Constraints
- Constraints.Builder
- OneTimeWorkRequest
- OneTimeWorkRequest.Builder
- Configuration
- Configuration.Builder
- Data
- Data.Builder
- WorkRequest
- WorkRequest.Builder
- OverwritingInputMerger
- InputMerger
- Worker
- PeriodicWorkRequest
- PeriodicWorkRequest.Builder
- WorkContinuation
- ArrayCreatingInputMerger
- WorkStatus
- WorkManager
- ContentUriTriggers
- ContentUriTriggers.Trigger
Enums