# SportsTeam.BuilderBase

Artifact: [androidx.appsearch:appsearch-builtin-types](https://developer.android.com/jetpack/androidx/releases/appsearch) [View Source](https://cs.android.com/search?q=file:androidx/appsearch/builtintypes/SportsTeam.java+class:androidx.appsearch.builtintypes.SportsTeam.BuilderBase) Added in [1.2.0-alpha02](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

*** ** * ** ***


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

<br />

|---|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||||
| ↳ | [androidx.appsearch.builtintypes.Thing.BuilderBase](https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase) ||||
|   | ↳ | [androidx.appsearch.builtintypes.Organization.BuilderBase](https://developer.android.com/reference/androidx/appsearch/builtintypes/Organization.BuilderBase) |||
|   |   | ↳ | [androidx.appsearch.builtintypes.SportsOrganization.BuilderBase](https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsOrganization.BuilderBase)\<T\> ||
|   |   |   | ↳ | [androidx.appsearch.builtintypes.SportsTeam.BuilderBase](https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam.BuilderBase) |

Known direct subclasses [SportsTeam.Builder](https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam.Builder)

|---|---|
| `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam.Builder` |   |

*** ** * ** ***

Builder for `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam.BuilderBase#BuilderBase(androidx.appsearch.builtintypes.SportsTeam)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam sportsTeam)` Constructor for `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam.BuilderBase` with all the existing values. |
| `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam.BuilderBase#BuilderBase(java.lang.String,java.lang.String,java.lang.String)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html namespace, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html id, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html sport )` Constructor for `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam.BuilderBase`. |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam.BuilderBase#build()()` Builds a `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing` object. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam.BuilderBase#setFormattedRecord(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html 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. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam.BuilderBase#setLosses(long)(long losses)` Sets the number of losses of the sports team. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam.BuilderBase#setOvertimeLosses(long)(long overtimeLosses)` Sets the number of overtime losses of the sports team. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam.BuilderBase#setOvertimeWins(long)(long overtimeWins)` Sets the number of overtime wins of the sports team. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam.BuilderBase#setTies(long)(long ties)` Sets the number of ties of the sports team. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam.BuilderBase#setWins(long)(long wins)` Sets the number of wins of the sports team. |

### Inherited methods

From [androidx.appsearch.builtintypes.Organization.BuilderBase](https://developer.android.com/reference/androidx/appsearch/builtintypes/Organization.BuilderBase) `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appsearch/builtintypes/Organization` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Organization.BuilderBase#build()()`

Builds a `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing` object.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Organization.BuilderBase#setLogo(androidx.appsearch.builtintypes.ImageObject)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/appsearch/builtintypes/ImageObject logo)`

Sets the logo of the organization.
From [androidx.appsearch.builtintypes.SportsOrganization.BuilderBase](https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsOrganization.BuilderBase) `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsOrganization.BuilderBase#setAccentColor(android.graphics.Color)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/Color.html accentColor)`

Sets the accent color of the sports organization as a `https://developer.android.com/reference/android/graphics/Color.html`.
From [androidx.appsearch.builtintypes.Thing.BuilderBase](https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase) `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#addAlternateName(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html alternateName)`

Adds an alias for the item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#addPotentialAction(androidx.appsearch.builtintypes.PotentialAction)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appsearch/builtintypes/PotentialAction newPotentialAction)`

Add a new action to the list of potential actions for this document.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#build()()`

Builds a `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing` object.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#clearAlternateNames()()`

Clears the aliases, if any, for the item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#clearPotentialActions()()`

Clear all the potential actions for this document.
`void` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#resetIfBuilt()()`

If built, make a copy of previous data for every field so that the builder can be reused.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#setAlternateNames(java.util.List<java.lang.String>)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/java/lang/String.html> alternateNames)`

Sets a list of aliases for the item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#setCreationTimestampMillis(long)(long creationTimestampMillis)`

Sets the creation timestamp for the current AppSearch entity, in milliseconds using the `https://developer.android.com/reference/java/lang/System.html#currentTimeMillis()` time base.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#setDescription(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html description)`

Sets the description for the item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#setDocumentScore(int)(int documentScore)`

Sets the user-provided opaque document score of the current AppSearch document, which can be used for ranking using `https://developer.android.com/reference/androidx/appsearch/app/SearchSpec#RANKING_STRATEGY_DOCUMENT_SCORE()`.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#setDocumentTtlMillis(long)(long documentTtlMillis)`

Sets the time-to-live (TTL) for the current AppSearch document as a duration in milliseconds.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#setImage(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html image)`

Sets the URL for an image of the item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#setName(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html name)`

Sets the name of the item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#setPotentialActions(java.util.List<androidx.appsearch.builtintypes.PotentialAction>)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/appsearch/builtintypes/PotentialAction> newPotentialActions)`

Sets a list of potential actions for this document.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase#setUrl(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html url)`

Sets the deeplink URL of the item.

## Public constructors

### BuilderBase

Added in [1.2.0-alpha02](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

```
public BuilderBase(@NonNull SportsTeam sportsTeam)
```

Constructor for `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam.BuilderBase` with all the existing values.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam sportsTeam` | The existing `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam` to copy values from. |

### BuilderBase

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

Constructor for `https://developer.android.com/reference/androidx/appsearch/builtintypes/SportsTeam.BuilderBase`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html namespace` | Namespace for the Document. See `https://developer.android.com/reference/androidx/appsearch/annotation/Document.Namespace`. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html id` | The unique identifier for the Document. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html sport` | The sport of the sports team. |

## Public methods

### build

```
public @NonNull SportsTeam build()
```

Builds a `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing` object.

### setFormattedRecord

Added in [1.2.0-alpha02](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

```
public @NonNull T setFormattedRecord(@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 |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html formattedRecord` | The formatted record of the sports team. |

### setLosses

Added in [1.2.0-alpha02](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

```
public @NonNull T setLosses(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](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

```
public @NonNull T setOvertimeLosses(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](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

```
public @NonNull T setOvertimeWins(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](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

```
public @NonNull T setTies(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](https://developer.android.com/jetpack/androidx/releases/appsearch#1.2.0-alpha02)

```
public @NonNull T setWins(long wins)
```

Sets the number of wins of the sports team.

| Parameters |
|---|---|
| `long wins` | The number of wins of the sports team. |