SportsTeam.BuilderBase


@ExperimentalAppSearchApi
public class SportsTeam.BuilderBase<T extends SportsTeam.BuilderBase<T>> extends SportsOrganization.BuilderBase

Known direct subclasses

Builder for SportsTeam.

Summary

Public constructors

Constructor for SportsTeam.BuilderBase with all the existing values.

BuilderBase(
    @NonNull String namespace,
    @NonNull String id,
    @NonNull String sport
)

Constructor for SportsTeam.BuilderBase.

Public methods

@NonNull SportsTeam

Builds a Thing object.

@NonNull T

Sets the formatted record of the sports team. eg: "10 - 5", "10 - 5 (3 - 2)", "10 - 5 (3 - 2) - 1 OT" depending on the sport.

@NonNull T
setLosses(long losses)

Sets the number of losses of the sports team.

@NonNull T
setOvertimeLosses(long overtimeLosses)

Sets the number of overtime losses of the sports team.

@NonNull T
setOvertimeWins(long overtimeWins)

Sets the number of overtime wins of the sports team.

@NonNull T
setTies(long ties)

Sets the number of ties of the sports team.

@NonNull T
setWins(long wins)

Sets the number of wins of the sports team.

Inherited methods

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

Builds a Thing object.

@NonNull T

Sets the logo of the organization.

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

Sets the accent color of the sports organization as a Color.

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

BuilderBase

Added in 1.2.0-alpha02
public BuilderBase(@NonNull SportsTeam sportsTeam)

Constructor for SportsTeam.BuilderBase with all the existing values.

Parameters
@NonNull SportsTeam sportsTeam

The existing SportsTeam to copy values from.

BuilderBase

public BuilderBase(
    @NonNull String namespace,
    @NonNull String id,
    @NonNull String sport
)

Constructor for SportsTeam.BuilderBase.

Parameters
@NonNull String namespace

Namespace for the Document. See Document.Namespace.

@NonNull String id

The unique identifier for the Document.

@NonNull String sport

The sport of the sports team.

Public methods

build

public @NonNull SportsTeam build()

Builds a Thing object.

setFormattedRecord

Added in 1.2.0-alpha02
public @NonNullsetFormattedRecord(@Nullable String formattedRecord)

Sets the formatted record of the sports team. eg: "10 - 5", "10 - 5 (3 - 2)", "10 - 5 (3 - 2) - 1 OT" depending on the sport.

Parameters
@Nullable String formattedRecord

The formatted record of the sports team.

setLosses

Added in 1.2.0-alpha02
public @NonNullsetLosses(long losses)

Sets the number of losses of the sports team.

Parameters
long losses

The number of losses of the sports team.

setOvertimeLosses

Added in 1.2.0-alpha02
public @NonNullsetOvertimeLosses(long overtimeLosses)

Sets the number of overtime losses of the sports team.

Parameters
long overtimeLosses

The number of overtime losses of the sports team.

setOvertimeWins

Added in 1.2.0-alpha02
public @NonNullsetOvertimeWins(long overtimeWins)

Sets the number of overtime wins of the sports team.

Parameters
long overtimeWins

The number of overtime wins of the sports team.

setTies

Added in 1.2.0-alpha02
public @NonNullsetTies(long ties)

Sets the number of ties of the sports team.

Parameters
long ties

The number of ties of the sports team.

setWins

Added in 1.2.0-alpha02
public @NonNullsetWins(long wins)

Sets the number of wins of the sports team.

Parameters
long wins

The number of wins of the sports team.