@Document.BuilderProducer
public final class SportsEvent.Builder extends SportsEvent.BuilderBase


Summary

Public constructors

Builder(@NonNull SportsEvent sportsEvent)

Constructor with all the existing values.

Builder(
    @NonNull String namespace,
    @NonNull String id,
    @NonNull Instant startDate,
    @NonNull String sport,
    @NonNull SportsTeam homeTeam,
    @NonNull SportsTeam awayTeam
)

Constructor for SportsEvent.Builder.

Inherited methods

From androidx.appsearch.builtintypes.Event.BuilderBase
@NonNull Event

Builds a Thing object.

@NonNull T

Sets the duration of the event as a Duration.

@NonNull T

Sets the end date of the event as a Instant.

@NonNull T

Sets the location of the event.

@NonNull T

Sets the logo of the event.

From androidx.appsearch.builtintypes.SportsEvent.BuilderBase
@NonNull SportsEvent

Builds a Thing object.

@NonNull T
setAwayTeamAccessoryScore(@Nullable String awayTeamAccessoryScore)

Sets the away team accessory score of the sports event.

@NonNull T

Sets the away team score of the sports event.

@NonNull T
setAwayTeamWinProbability(double awayTeamWinProbability)

Sets the away team win probability of the sports event.

@NonNull T
setGameTemporalState(@Nullable String gameTemporalState)

Sets the game temporal state of the sports event.

@NonNull T
setHomeTeamAccessoryScore(@Nullable String homeTeamAccessoryScore)

Sets the home team accessory score of the sports event.

@NonNull T

Sets the home team score of the sports event.

@NonNull T
setHomeTeamWinProbability(double homeTeamWinProbability)

Sets the home team win probability of the sports event.

@NonNull T

Sets the most recent notable detail of the sports event.

@NonNull T

Sets the Organization of the sports event.

@NonNull T
setPlaceHomeTeamAtStart(boolean placeHomeTeamAtStart)

Sets whether the home team should be placed at the start for a visual representation of the sports event.

@NonNull T
setResult(long result)

Sets whether the home team won the sports event.

@NonNull T
setSportsEventStatus(long sportsEventStatus)

Sets the status of the sports event.

@NonNull T
setSportsEventStatusLabel(@Nullable String sportsEventStatusLabel)

Sets the status label of the sports event.

From androidx.appsearch.builtintypes.Thing.BuilderBase
@NonNull T

Adds an alias for the item.

@NonNull T

Add a new action to the list of potential actions for this document.

@NonNull Thing

Builds a Thing object.

@NonNull T

Clears the aliases, if any, for the item.

@NonNull T

Clear all the potential actions for this document.

void

If built, make a copy of previous data for every field so that the builder can be reused.

@NonNull T

Sets a list of aliases for the item.

@NonNull T
setCreationTimestampMillis(long creationTimestampMillis)

Sets the creation timestamp for the current AppSearch entity, in milliseconds using the currentTimeMillis time base.

@NonNull T

Sets the description for the item.

@NonNull T
setDocumentScore(int documentScore)

Sets the user-provided opaque document score of the current AppSearch document, which can be used for ranking using RANKING_STRATEGY_DOCUMENT_SCORE.

@NonNull T
setDocumentTtlMillis(long documentTtlMillis)

Sets the time-to-live (TTL) for the current AppSearch document as a duration in milliseconds.

@NonNull T

Sets the URL for an image of the item.

@NonNull T

Sets the name of the item.

@NonNull T

Sets a list of potential actions for this document.

@NonNull T

Sets the deeplink URL of the item.

Public constructors

Builder

Added in 1.2.0-alpha02
public Builder(@NonNull SportsEvent sportsEvent)

Constructor with all the existing values.

Builder

Added in 1.2.0-alpha02
public Builder(
    @NonNull String namespace,
    @NonNull String id,
    @NonNull Instant startDate,
    @NonNull String sport,
    @NonNull SportsTeam homeTeam,
    @NonNull SportsTeam awayTeam
)

Constructor for SportsEvent.Builder.

Parameters
@NonNull String namespace

Namespace for the Document. See Document.Namespace.

@NonNull String id

Unique identifier for the Document. See Document.Id.

@NonNull Instant startDate

The start date of the sports event.

@NonNull String sport

The sport of the sports event.

@NonNull SportsTeam homeTeam

The home team of the sports event.

@NonNull SportsTeam awayTeam

The away team of the sports event.