WatchNextProgram.Builder

class WatchNextProgram.Builder


This Builder class simplifies the creation of a WatchNextProgram object.

Summary

Public constructors

Creates a new Builder object.

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

Public functions

WatchNextProgram!
T!
setAudioLanguages(audioLanguages: Array<String!>!)

Sets the available audio languages for this program as an array of strings.

T!
setAuthor(author: String!)

Sets the author or artist of this content.

T!
setAvailability(availability: Int)

Sets the availability of this TV program.

T!

Sets the genres of the program.

T!
setContentId(contentId: String!)

Sets the content ID for this program.

T!

Sets the content ratings for this program.

T!
setDescription(description: String!)

Sets a brief description of the program.

T!

Sets the last playback duration (in milliseconds) of the preview video.

T!

Sets the end time of the program (for live programs).

T!
setEpisodeNumber(episodeNumber: Int)

Sets the episode number in a season for this episode for a series.

T!
setEpisodeNumber(episodeNumber: String!, numericalEpisodeNumber: Int)

Sets the episode number in a season for this episode for a series.

T!
setEpisodeTitle(episodeTitle: String!)

Sets the title of this particular episode for a series.

T!
setGenre(genre: String!)

Sets the genre for this program.

T!
setId(programId: Long)

Sets a unique id for this program.

T!
setIntent(intent: Intent!)

Sets the intent which is launched when the program is selected.

T!
setIntentUri(intentUri: Uri!)

Sets the intent URI which is launched when the program is selected.

T!
setInteractionCount(interactionCount: Long)

Sets the interaction count for this program.

T!
setInteractionType(interactionType: Int)

Sets the type of interaction for this TV program.

T!

Sets the internal provider data for the program as raw bytes.

T!

Sets the internal provider flag1 for the program.

T!

Sets the internal provider flag2 for the program.

T!

Sets the internal provider flag3 for the program.

T!

Sets the internal provider flag4 for the program.

T!

Sets external ID for the program.

T!
setItemCount(itemCount: Int)

Sets the count of the items included in this TV program.

WatchNextProgram.Builder!
setLastEngagementTimeUtcMillis(lastEngagementTimeUtcMillis: Long)

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

T!

Sets the last playback position (in milliseconds) of the preview video.

T!

Sets whether this TV program is live or not.

T!
setLogoContentDescription(logoContentDescription: String!)

Sets the logo's content description for this program.

T!
setLogoUri(logoUri: Uri!)

Sets the URI for the logo of this TV program.

T!
setLongDescription(longDescription: String!)

Sets a longer description of a program if one exists.

T!

Sets the offer price of this TV program.

T!

Sets the aspect ratio of the poster art for this TV program.

T!
setPosterArtUri(posterArtUri: Uri!)

Sets the large poster art of the program.

T!
setPreviewAudioUri(previewAudioUri: Uri!)

Sets a URI for the preview audio.

T!
setPreviewVideoUri(previewVideoUri: Uri!)

Sets a URI for the preview video.

T!
setReleaseDate(releaseDate: Date!)

Sets the release date of this TV program.

T!
setReleaseDate(releaseDate: String!)

Sets the release date of this TV program.

T!
setReviewRating(reviewRating: String!)

Sets the review rating score for this program.

T!
setReviewRatingStyle(reviewRatingStyle: Int)

Sets the review rating score style used for setReviewRating.

T!
setSearchable(searchable: Boolean)

Sets whether this channel can be searched for in other applications.

T!
setSeasonNumber(seasonNumber: Int)

Sets the season number for this episode for a series.

T!
setSeasonNumber(seasonNumber: String!, numericalSeasonNumber: Int)

Sets the season number for this episode for a series.

T!
setSeasonTitle(seasonTitle: String!)

Sets a custom name for the season, if applicable.

T
setSeriesId(seriesId: String?)

Sets the series ID for this program.

T!

Sets the start time of the program (for live programs).

T!

Sets the starting price of this TV program.

T!

Sets the aspect ratio of the thumbnail for this TV program.

T!
setThumbnailUri(thumbnailUri: Uri!)

Sets a small thumbnail of the program.

T!
setTitle(title: String!)

Sets the title of this program.

T!
setTransient(transientValue: Boolean)

Sets whether this program is transient or not.

T!

Set the TV series item type for this program.

T!
setType(type: Int)

Sets the type of this program content.

T!

Sets the video height of the program.

T!

Sets the video width of the program.

WatchNextProgram.Builder!
setWatchNextType(watchNextType: Int)

Sets the "watch next" type of this program content.

Public constructors

Builder

Added in 1.1.0-alpha02
Builder()

Creates a new Builder object.

Builder

Added in 1.1.0-alpha02
Builder(other: WatchNextProgram!)

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

Parameters
other: WatchNextProgram!

The Program you're copying from.

Public functions

build

Added in 1.1.0-alpha02
fun build(): WatchNextProgram!
Returns
WatchNextProgram!

A new Program with values supplied by the Builder.

setAudioLanguages

Added in 1.1.0-alpha02
fun setAudioLanguages(audioLanguages: Array<String!>!): T!

Sets the available audio languages for this program as an array of strings.

Parameters
audioLanguages: Array<String!>!

An array of audio languages, in ISO 639-1 or 639-2/T codes, that apply to this program which will be stored in a database.

Returns
T!

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

setAuthor

Added in 1.1.0-alpha02
fun setAuthor(author: String!): T!

Sets the author or artist of this content.

Parameters
author: String!

The author of the program.

Returns
T!

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

See also
COLUMN_AUTHOR

setAvailability

Added in 1.1.0-alpha02
fun setAvailability(availability: Int): T!

Sets the availability of this TV program.

The value should match one of the followings: .PreviewPrograms#AVAILABILITY_AVAILABLE, .PreviewPrograms#AVAILABILITY_FREE_WITH_SUBSCRIPTION, .PreviewPrograms#AVAILABILITY_PAID_CONTENT, .PreviewPrograms#AVAILABILITY_PURCHASED, and .PreviewPrograms#AVAILABILITY_FREE.

Parameters
availability: Int

The availability of the program.

Returns
T!

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

setCanonicalGenres

Added in 1.1.0-alpha02
fun setCanonicalGenres(genres: Array<String!>!): T!

Sets the genres of the program.

Parameters
genres: Array<String!>!

An array of androidx.tvprovider.media.tv.TvContractCompat.Programs.Genres that apply to the program which will be flattened to a String to store in a database.

Returns
T!

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

setContentId

Added in 1.1.0-alpha02
fun setContentId(contentId: String!): T!

Sets the content ID for this program.

Parameters
contentId: String!

The content ID for the program.

Returns
T!

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

setContentRatings

Added in 1.1.0-alpha02
fun setContentRatings(contentRatings: Array<TvContentRating!>!): T!

Sets the content ratings for this program.

Parameters
contentRatings: Array<TvContentRating!>!

An array of android.media.tv.TvContentRating that apply to this program which will be flattened to a String to store in a database.

Returns
T!

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

setDescription

Added in 1.1.0-alpha02
fun setDescription(description: String!): T!

Sets a brief description of the program. For a series, this would be a brief description of the episode.

Parameters
description: String!

The short description for the program.

Returns
T!

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

setDurationMillis

Added in 1.1.0-alpha02
fun setDurationMillis(duration: Int): T!

Sets the last playback duration (in milliseconds) of the preview video.

Parameters
duration: Int

The duration the program in millis.

Returns
T!

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

setEndTimeUtcMillis

Added in 1.1.0-alpha02
fun setEndTimeUtcMillis(endTime: Long): T!

Sets the end time of the program (for live programs).

Parameters
endTime: Long

The end time for the program.

Returns
T!

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

setEpisodeNumber

Added in 1.1.0-alpha02
fun setEpisodeNumber(episodeNumber: Int): T!

Sets the episode number in a season for this episode for a series.

Parameters
episodeNumber: Int

The value of episode display number for the program.

Returns
T!

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

setEpisodeNumber

Added in 1.1.0-alpha02
fun setEpisodeNumber(episodeNumber: String!, numericalEpisodeNumber: Int): T!

Sets the episode number in a season for this episode for a series.

Parameters
episodeNumber: String!

The value of episode display number for the program.

numericalEpisodeNumber: Int

An integer value for COLUMN_EPISODE_NUMBER which will be used for API Level 23 and below.

Returns
T!

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

setEpisodeTitle

Added in 1.1.0-alpha02
fun setEpisodeTitle(episodeTitle: String!): T!

Sets the title of this particular episode for a series.

Parameters
episodeTitle: String!

The episode title for the program.

Returns
T!

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

setGenre

Added in 1.1.0-alpha02
fun setGenre(genre: String!): T!

Sets the genre for this program.

Parameters
genre: String!

The genre for the program.

Returns
T!

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

See also
COLUMN_GENRE

setId

Added in 1.1.0-alpha02
fun setId(programId: Long): T!

Sets a unique id for this program.

Parameters
programId: Long

The ID for the program.

Returns
T!

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

See also
_ID

setIntent

Added in 1.1.0-alpha02
fun setIntent(intent: Intent!): T!

Sets the intent which is launched when the program is selected.

Parameters
intent: Intent!

The Intent to be executed when the preview program is selected

Returns
T!

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

setIntentUri

Added in 1.1.0-alpha02
fun setIntentUri(intentUri: Uri!): T!

Sets the intent URI which is launched when the program is selected.

Parameters
intentUri: Uri!

The intent URI for the program.

Returns
T!

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

setInteractionCount

Added in 1.1.0-alpha02
fun setInteractionCount(interactionCount: Long): T!

Sets the interaction count for this program.

Parameters
interactionCount: Long

The interaction count for the program.

Returns
T!

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

setInteractionType

Added in 1.1.0-alpha02
fun setInteractionType(interactionType: Int): T!

Sets the type of interaction for this TV program.

The value should match one of the followings: .PreviewPrograms#INTERACTION_TYPE_LISTENS, .PreviewPrograms#INTERACTION_TYPE_FOLLOWERS, INTERACTION_TYPE_FANS, INTERACTION_TYPE_LIKES, .PreviewPrograms#INTERACTION_TYPE_THUMBS, INTERACTION_TYPE_VIEWS, and .PreviewPrograms#INTERACTION_TYPE_VIEWERS.

Parameters
interactionType: Int

The interaction type of the program.

Returns
T!

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

setInternalProviderData

Added in 1.1.0-alpha02
fun setInternalProviderData(data: ByteArray!): T!

Sets the internal provider data for the program as raw bytes.

Parameters
data: ByteArray!

The internal provider data for the program.

Returns
T!

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

setInternalProviderFlag1

Added in 1.1.0-alpha02
fun setInternalProviderFlag1(flag: Long): T!

Sets the internal provider flag1 for the program.

Parameters
flag: Long

The first internal provider flag for the program.

Returns
T!

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

setInternalProviderFlag2

Added in 1.1.0-alpha02
fun setInternalProviderFlag2(flag: Long): T!

Sets the internal provider flag2 for the program.

Parameters
flag: Long

The second internal provider flag for the program.

Returns
T!

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

setInternalProviderFlag3

Added in 1.1.0-alpha02
fun setInternalProviderFlag3(flag: Long): T!

Sets the internal provider flag3 for the program.

Parameters
flag: Long

The third internal provider flag for the program.

Returns
T!

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

setInternalProviderFlag4

Added in 1.1.0-alpha02
fun setInternalProviderFlag4(flag: Long): T!

Sets the internal provider flag4 for the program.

Parameters
flag: Long

The forth internal provider flag for the program.

Returns
T!

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

setInternalProviderId

Added in 1.1.0-alpha02
fun setInternalProviderId(externalId: String!): T!

Sets external ID for the program.

Parameters
externalId: String!

The internal provider ID for the program.

Returns
T!

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

See also
TvContractCompat

.PreviewPrograms#COLUMN_INTERNAL_PROVIDER_ID

setItemCount

Added in 1.1.0-alpha02
fun setItemCount(itemCount: Int): T!

Sets the count of the items included in this TV program.

Parameters
itemCount: Int

The item count for the program.

Returns
T!

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

setLastEngagementTimeUtcMillis

Added in 1.1.0-alpha02
fun setLastEngagementTimeUtcMillis(lastEngagementTimeUtcMillis: Long): WatchNextProgram.Builder!

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

Parameters
lastEngagementTimeUtcMillis: Long

The value of COLUMN_LAST_ENGAGEMENT_TIME_UTC_MILLIS for the program.

Returns
WatchNextProgram.Builder!

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

setLastPlaybackPositionMillis

Added in 1.1.0-alpha02
fun setLastPlaybackPositionMillis(position: Int): T!

Sets the last playback position (in milliseconds) of the preview video.

Parameters
position: Int

The last playback posirion for the program in millis.

Returns
T!

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

See also
TvContractCompat

.PreviewPrograms#COLUMN_LAST_PLAYBACK_POSITION_MILLIS

setLive

Added in 1.1.0-alpha02
fun setLive(live: Boolean): T!

Sets whether this TV program is live or not.

Parameters
live: Boolean

Whether the program is live or not.

Returns
T!

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

See also
COLUMN_LIVE

setLogoContentDescription

Added in 1.1.0-alpha02
fun setLogoContentDescription(logoContentDescription: String!): T!

Sets the logo's content description for this program.

Parameters
logoContentDescription: String!

The content description for the logo displayed in the program.

Returns
T!

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

See also
TvContractCompat

.PreviewPrograms#COLUMN_LOGO_CONTENT_DESCRIPTION

COLUMN_LOGO_URI

setLogoUri

Added in 1.1.0-alpha02
fun setLogoUri(logoUri: Uri!): T!

Sets the URI for the logo of this TV program.

Parameters
logoUri: Uri!

The logo URI for the program.

Returns
T!

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

See also
COLUMN_LOGO_URI

setLongDescription

Added in 1.1.0-alpha02
fun setLongDescription(longDescription: String!): T!

Sets a longer description of a program if one exists.

Parameters
longDescription: String!

The long description for the program.

Returns
T!

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

setOfferPrice

Added in 1.1.0-alpha02
fun setOfferPrice(price: String!): T!

Sets the offer price of this TV program.

Parameters
price: String!

The offer price of the program.

Returns
T!

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

setPosterArtAspectRatio

Added in 1.1.0-alpha02
fun setPosterArtAspectRatio(ratio: Int): T!

Sets the aspect ratio of the poster art for this TV program.

The value should match one of the followings: ASPECT_RATIO_16_9, ASPECT_RATIO_3_2, ASPECT_RATIO_4_3, ASPECT_RATIO_1_1, ASPECT_RATIO_2_3, and .PreviewPrograms#ASPECT_RATIO_MOVIE_POSTER.

Parameters
ratio: Int

The poster art aspect ratio for the program.

Returns
T!

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

See also
TvContractCompat

.PreviewPrograms#COLUMN_POSTER_ART_ASPECT_RATIO

COLUMN_POSTER_ART_URI

setPosterArtUri

Added in 1.1.0-alpha02
fun setPosterArtUri(posterArtUri: Uri!): T!

Sets the large poster art of the program.

Parameters
posterArtUri: Uri!

The poster art URI for the program.

Returns
T!

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

setPreviewAudioUri

Added in 1.1.0-alpha02
fun setPreviewAudioUri(previewAudioUri: Uri!): T!

Sets a URI for the preview audio.

Parameters
previewAudioUri: Uri!

The preview audio URI for the program.

Returns
T!

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

setPreviewVideoUri

Added in 1.1.0-alpha02
fun setPreviewVideoUri(previewVideoUri: Uri!): T!

Sets a URI for the preview video.

Parameters
previewVideoUri: Uri!

The preview video URI for the program.

Returns
T!

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

setReleaseDate

Added in 1.1.0-alpha02
fun setReleaseDate(releaseDate: Date!): T!

Sets the release date of this TV program.

Parameters
releaseDate: Date!

The release date of the program.

Returns
T!

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

setReleaseDate

Added in 1.1.0-alpha02
fun setReleaseDate(releaseDate: String!): T!

Sets the release date of this TV program.

The value should be in one of the following formats: "yyyy", "yyyy-MM-dd", and "yyyy-MM-ddTHH:mm:ssZ" (UTC in ISO 8601).

Parameters
releaseDate: String!

The release date of the program.

Returns
T!

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

setReviewRating

Added in 1.1.0-alpha02
fun setReviewRating(reviewRating: String!): T!

Sets the review rating score for this program.

The format of the value is dependent on the review rating style. If the style is based on "stars", the value should be a real number between 0.0 and 5.0. (e.g. "4.5") If the style is based on "thumbs up/down", the value should be two integers, one for thumbs-up count and the other for thumbs-down count, with a comma between them. (e.g. "200,40") If the style is base on "percentage", the value should be a real number between 0 and 100. (e.g. "99.9")

Parameters
reviewRating: String!

The value of the review rating for the program.

Returns
T!

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

setReviewRatingStyle

Added in 1.1.0-alpha02
fun setReviewRatingStyle(reviewRatingStyle: Int): T!

Sets the review rating score style used for setReviewRating.

Parameters
reviewRatingStyle: Int

The reviewing rating style for the program.

Returns
T!

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

setSearchable

Added in 1.1.0-alpha02
fun setSearchable(searchable: Boolean): T!

Sets whether this channel can be searched for in other applications.

Parameters
searchable: Boolean

Whether the program is searchable or not.

Returns
T!

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

setSeasonNumber

Added in 1.1.0-alpha02
fun setSeasonNumber(seasonNumber: Int): T!

Sets the season number for this episode for a series.

Parameters
seasonNumber: Int

The season display number for the program.

Returns
T!

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

setSeasonNumber

Added in 1.1.0-alpha02
fun setSeasonNumber(seasonNumber: String!, numericalSeasonNumber: Int): T!

Sets the season number for this episode for a series.

Parameters
seasonNumber: String!

The season display number for the program.

numericalSeasonNumber: Int

An integer value for COLUMN_SEASON_NUMBER which will be used for API Level 23 and below.

Returns
T!

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

setSeasonTitle

Added in 1.1.0-alpha02
fun setSeasonTitle(seasonTitle: String!): T!

Sets a custom name for the season, if applicable.

Parameters
seasonTitle: String!

The season title for the program.

Returns
T!

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

setSeriesId

Added in 1.1.0-alpha02
fun setSeriesId(seriesId: String?): T

Sets the series ID for this program.

Parameters
seriesId: String?

The series ID for the program.

Returns
T

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

See also
COLUMN_SERIES_ID

setStartTimeUtcMillis

Added in 1.1.0-alpha02
fun setStartTimeUtcMillis(startTime: Long): T!

Sets the start time of the program (for live programs).

Parameters
startTime: Long

The start time for the program.

Returns
T!

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

See also
TvContractCompat

.PreviewPrograms#COLUMN_START_TIME_UTC_MILLIS

setStartingPrice

Added in 1.1.0-alpha02
fun setStartingPrice(price: String!): T!

Sets the starting price of this TV program.

Parameters
price: String!

The starting price of the program.

Returns
T!

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

setThumbnailAspectRatio

Added in 1.1.0-alpha02
fun setThumbnailAspectRatio(ratio: Int): T!

Sets the aspect ratio of the thumbnail for this TV program.

The value should match one of the followings: ASPECT_RATIO_16_9, ASPECT_RATIO_3_2, ASPECT_RATIO_4_3, ASPECT_RATIO_1_1, ASPECT_RATIO_2_3, and .PreviewPrograms#ASPECT_RATIO_MOVIE_POSTER.

Parameters
ratio: Int

The thumbnail aspect ratio of the program.

Returns
T!

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

See also
TvContractCompat

.PreviewPrograms#COLUMN_THUMBNAIL_ASPECT_RATIO

setThumbnailUri

Added in 1.1.0-alpha02
fun setThumbnailUri(thumbnailUri: Uri!): T!

Sets a small thumbnail of the program.

Parameters
thumbnailUri: Uri!

The thumbnail URI for the program.

Returns
T!

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

setTitle

Added in 1.1.0-alpha02
fun setTitle(title: String!): T!

Sets the title of this program. For a series, this is the series title.

Parameters
title: String!

The title for the program.

Returns
T!

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

See also
COLUMN_TITLE

setTransient

Added in 1.1.0-alpha02
fun setTransient(transientValue: Boolean): T!

Sets whether this program is transient or not.

Parameters
transientValue: Boolean

Whether the program is transient or not.

Returns
T!

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

See also
COLUMN_TRANSIENT

setTvSeriesItemType

Added in 1.1.0-alpha02
fun setTvSeriesItemType(type: Int): T!

Set the TV series item type for this program.

Parameters
type: Int

the TV series item type

Returns
T!

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

setType

Added in 1.1.0-alpha02
fun setType(type: Int): T!

Sets the type of this program content.

The value should match one of the followings: TYPE_MOVIE, TYPE_TV_SERIES, TYPE_TV_SEASON, TYPE_TV_EPISODE, TYPE_CLIP, TYPE_EVENT, TYPE_CHANNEL, TYPE_TRACK, TYPE_ALBUM, TYPE_ARTIST, TYPE_PLAYLIST, TYPE_STATION, and TYPE_GAME.

Parameters
type: Int

The type of the program.

Returns
T!

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

See also
COLUMN_TYPE

setVideoHeight

Added in 1.1.0-alpha02
fun setVideoHeight(height: Int): T!

Sets the video height of the program.

Parameters
height: Int

The video height for the program.

Returns
T!

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

setVideoWidth

Added in 1.1.0-alpha02
fun setVideoWidth(width: Int): T!

Sets the video width of the program.

Parameters
width: Int

The video width for the program.

Returns
T!

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

setWatchNextType

Added in 1.1.0-alpha02
fun setWatchNextType(watchNextType: Int): WatchNextProgram.Builder!

Sets the "watch next" type of this program content.

The value should match one of the followings: WATCH_NEXT_TYPE_CONTINUE, WATCH_NEXT_TYPE_NEXT, and WATCH_NEXT_TYPE_NEW.

Parameters
watchNextType: Int

The value of COLUMN_WATCH_NEXT_TYPE for the program.

Returns
WatchNextProgram.Builder!

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