public class

Program.Builder

extends BaseProgram.Builder<Program.Builder>

 java.lang.Object

androidx.tvprovider.media.tv.BaseProgram.Builder<Program.Builder>

↳androidx.tvprovider.media.tv.Program.Builder

Overview

This Builder class simplifies the creation of a Program object.

Summary

Fields
from BaseProgram.Builder<T>mValues
Constructors
publicBuilder()

Creates a new Builder object.

publicBuilder(Program other)

Creates a new Builder object with values copied from another Program.

Methods
public Programbuild()

public Program.BuildersetBroadcastGenres(java.lang.String genres[])

Sets the broadcast-specified genres of the program.

public Program.BuildersetChannelId(long channelId)

Sets the ID of the Channel that contains this program.

public Program.BuildersetEndTimeUtcMillis(long endTimeUtcMillis)

Sets the time when this program is going to end in milliseconds since the epoch.

public Program.BuildersetEventId(int eventId)

Sets the event ID for this program.

public Program.BuildersetGlobalContentId(java.lang.String globalContentId)

Sets the global content ID for this program.

public Program.BuildersetRecordingProhibited(boolean prohibited)

Sets whether this program cannot be recorded.

public Program.BuildersetStartTimeUtcMillis(long startTimeUtcMillis)

Sets the time when the program is going to begin in milliseconds since the epoch.

from BaseProgram.Builder<T>setAudioLanguages, setCanonicalGenres, setContentRatings, setDescription, setEpisodeNumber, setEpisodeNumber, setEpisodeTitle, setId, setInternalProviderData, setInternalProviderFlag1, setInternalProviderFlag2, setInternalProviderFlag3, setInternalProviderFlag4, setLongDescription, setPackageName, setPosterArtUri, setReviewRating, setReviewRatingStyle, setSearchable, setSeasonNumber, setSeasonNumber, setSeasonTitle, setSeriesId, setThumbnailUri, setTitle, setVideoHeight, setVideoWidth
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Creates a new Builder object.

public Builder(Program other)

Creates a new Builder object with values copied from another Program.

Parameters:

other: The Program you're copying from.

Methods

public Program.Builder setChannelId(long channelId)

Sets the ID of the Channel that contains this program.

Parameters:

channelId: The value of {@link Programs#COLUMN_CHANNEL_ID for the program.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Program.Builder setStartTimeUtcMillis(long startTimeUtcMillis)

Sets the time when the program is going to begin in milliseconds since the epoch.

Parameters:

startTimeUtcMillis: The value of TvContractCompat.Programs.COLUMN_START_TIME_UTC_MILLIS for the program.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Program.Builder setEndTimeUtcMillis(long endTimeUtcMillis)

Sets the time when this program is going to end in milliseconds since the epoch.

Parameters:

endTimeUtcMillis: The value of TvContractCompat.Programs.COLUMN_END_TIME_UTC_MILLIS for the program.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Program.Builder setBroadcastGenres(java.lang.String genres[])

Sets the broadcast-specified genres of the program.

Parameters:

genres: 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.

Returns:

This Builder object to allow for chaining of calls to builder methods.

See also: TvContractCompat.Programs.COLUMN_BROADCAST_GENRE

public Program.Builder setRecordingProhibited(boolean prohibited)

Sets whether this program cannot be recorded.

Parameters:

prohibited: The value of TvContractCompat.Programs.COLUMN_RECORDING_PROHIBITED for the program.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Program.Builder setEventId(int eventId)

Sets the event ID for this program.

No-op on devices prior to .

Parameters:

eventId: The value of TvContractCompat.Programs.COLUMN_EVENT_ID for the program.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Program.Builder setGlobalContentId(java.lang.String globalContentId)

Sets the global content ID for this program.

No-op on devices prior to .

Parameters:

globalContentId: The value of TvContractCompat.Programs.COLUMN_GLOBAL_CONTENT_ID for the program.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Program build()

Returns:

A new Program with values supplied by the Builder.