Program.Builder
public class Program.Builder
This Builder class simplifies the creation of a Program
object.
Summary
Public constructors |
---|
Builder() Creates a new Builder object. |
Creates a new Builder object with values copied from another Program. |
Public methods |
|
---|---|
Program |
build() |
Program.Builder |
setBroadcastGenres(String[] genres) Sets the broadcast-specified genres of the program. |
Program.Builder |
setChannelId(long channelId) Sets the ID of the |
Program.Builder |
setEndTimeUtcMillis(long endTimeUtcMillis) Sets the time when this program is going to end in milliseconds since the epoch. |
@NonNull Program.Builder |
setEventId(int eventId) Sets the event ID for this program. |
@NonNull Program.Builder |
setGlobalContentId(@Nullable String globalContentId) Sets the global content ID for this program. |
Program.Builder |
setRecordingProhibited(boolean prohibited) Sets whether this program cannot be recorded. |
Program.Builder |
setStartTimeUtcMillis(long startTimeUtcMillis) Sets the time when the program is going to begin in milliseconds since the epoch. |
Public constructors
Public methods
build
public Program build()
Returns | |
---|---|
Program |
A new Program with values supplied by the Builder. |
setBroadcastGenres
public Program.Builder setBroadcastGenres(String[] genres)
Sets the broadcast-specified genres of the program.
Parameters | |
---|---|
String[] 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 | |
---|---|
Program.Builder |
This Builder object to allow for chaining of calls to builder methods. |
See also | |
---|---|
COLUMN_BROADCAST_GENRE |
setChannelId
public Program.Builder setChannelId(long channelId)
Sets the ID of the Channel
that contains this program.
Parameters | |
---|---|
long channelId |
The value of |
setEndTimeUtcMillis
public Program.Builder setEndTimeUtcMillis(long endTimeUtcMillis)
Sets the time when this program is going to end in milliseconds since the epoch.
Parameters | |
---|---|
long endTimeUtcMillis |
The value of |
Returns | |
---|---|
Program.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setEventId
public @NonNull Program.Builder setEventId(int eventId)
Sets the event ID for this program.
No-op on devices prior to R
.
Parameters | |
---|---|
int eventId |
The value of |
Returns | |
---|---|
@NonNull Program.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setGlobalContentId
public @NonNull Program.Builder setGlobalContentId(@Nullable String globalContentId)
Sets the global content ID for this program.
No-op on devices prior to R
.
Parameters | |
---|---|
@Nullable String globalContentId |
The value of |
Returns | |
---|---|
@NonNull Program.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setRecordingProhibited
public Program.Builder setRecordingProhibited(boolean prohibited)
Sets whether this program cannot be recorded.
Parameters | |
---|---|
boolean prohibited |
The value of |
Returns | |
---|---|
Program.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setStartTimeUtcMillis
public Program.Builder setStartTimeUtcMillis(long startTimeUtcMillis)
Sets the time when the program is going to begin in milliseconds since the epoch.
Parameters | |
---|---|
long startTimeUtcMillis |
The value of |
Returns | |
---|---|
Program.Builder |
This Builder object to allow for chaining of calls to builder methods. |