Builder
class Builder : Builder<Program.Builder!>
androidx.tvprovider.media.tv.Program.Builder |
This Builder class simplifies the creation of a Program
object.
Summary
Public constructors | |
---|---|
<init>() Creates a new Builder object. |
|
Creates a new Builder object with values copied from another Program. |
Public methods | |
---|---|
open Program! |
build() |
open Program.Builder! |
setBroadcastGenres(genres: Array<String!>!) Sets the broadcast-specified genres of the program. |
open Program.Builder! |
setChannelId(channelId: Long) Sets the ID of the |
open Program.Builder! |
setEndTimeUtcMillis(endTimeUtcMillis: Long) Sets the time when this program is going to end in milliseconds since the epoch. |
open Program.Builder |
setEventId(eventId: Int) Sets the event ID for this program. |
open Program.Builder |
setGlobalContentId(@Nullable globalContentId: String?) Sets the global content ID for this program. |
open Program.Builder! |
setRecordingProhibited(prohibited: Boolean) Sets whether this program cannot be recorded. |
open Program.Builder! |
setStartTimeUtcMillis(startTimeUtcMillis: Long) Sets the time when the program is going to begin in milliseconds since the epoch. |
Public constructors
<init>
Builder()
Creates a new Builder object.
<init>
Builder(other: Program!)
Creates a new Builder object with values copied from another Program.
Parameters | |
---|---|
other |
Program!: The Program you're copying from. |
Public methods
setBroadcastGenres
open fun setBroadcastGenres(genres: Array<String!>!): Program.Builder!
Sets the broadcast-specified genres of the program.
Parameters | |
---|---|
genres |
Array<String!>!: Array of genres that apply to the program based on the broadcast standard which will be flattened to a String to store in a database. |
Return | |
---|---|
Program.Builder! |
This Builder object to allow for chaining of calls to builder methods. |
See Also
setChannelId
open fun setChannelId(channelId: Long): Program.Builder!
Sets the ID of the Channel
that contains this program.
Parameters | |
---|---|
channelId |
Long: The value of for the program. |
setEndTimeUtcMillis
open fun setEndTimeUtcMillis(endTimeUtcMillis: Long): Program.Builder!
Sets the time when this program is going to end in milliseconds since the epoch.
Parameters | |
---|---|
endTimeUtcMillis |
Long: The value of Programs#COLUMN_END_TIME_UTC_MILLIS for the program. |
Return | |
---|---|
Program.Builder! |
This Builder object to allow for chaining of calls to builder methods. |
setEventId
@NonNull open fun setEventId(eventId: Int): Program.Builder
Sets the event ID for this program.
No-op on devices prior to android.os.Build.VERSION_CODES#R
.
Parameters | |
---|---|
eventId |
Int: The value of Programs#COLUMN_EVENT_ID for the program. |
Return | |
---|---|
Program.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setGlobalContentId
@NonNull open fun setGlobalContentId(@Nullable globalContentId: String?): Program.Builder
Sets the global content ID for this program.
No-op on devices prior to android.os.Build.VERSION_CODES#R
.
Parameters | |
---|---|
globalContentId |
String?: The value of Programs#COLUMN_GLOBAL_CONTENT_ID for the program. |
Return | |
---|---|
Program.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setRecordingProhibited
open fun setRecordingProhibited(prohibited: Boolean): Program.Builder!
Sets whether this program cannot be recorded.