# StopwatchLap

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/StopwatchLap.java+class:androidx.appsearch.builtintypes.StopwatchLap) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appsearch#1.1.0)

*** ** * ** ***


```
@Document(name = "builtin:StopwatchLap")
public class StopwatchLap extends Thing
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.appsearch.builtintypes.Thing](https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing) ||
|   | ↳ | [androidx.appsearch.builtintypes.StopwatchLap](https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap) |

*** ** * ** ***

An AppSearch document representing a `https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap` entity.

A `https://developer.android.com/reference/androidx/appsearch/builtintypes/Stopwatch` can create a Lap, which will take a snapshot of the duration from when the previous Lap was created to when the new Lap is created. For example: if a `https://developer.android.com/reference/androidx/appsearch/builtintypes/Stopwatch` starts at 12:00, creates a Lap at 12:05, and creates another Lap at 12:15, then it would have created two Laps with 5 minutes duration and 10 minutes duration respectively.

## Summary

| ### Nested types |
|---|
| `@https://developer.android.com/reference/androidx/appsearch/annotation/Document.BuilderProducer public final class https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap.Builder extends https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap.BuilderBase<https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap.Builder>` Builder for `https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap`. |
| `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi public class https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap.BuilderBase<T extends https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap.BuilderBase<T>> extends https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing.BuilderBase<T>` |

| ### Public constructors |
|---|
| `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap#StopwatchLap(androidx.appsearch.builtintypes.StopwatchLap.BuilderBase<?>)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap.BuilderBase<@https://developer.android.com/reference/androidx/annotation/NonNull ?> builder)` Constructor for `https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap`. |

| ### Public methods |
|---|---|
| `long` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap#getAccumulatedLapDurationMillis()()` Returns the total duration in milliseconds accumulated by all the `https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap` instances up to and including this one. |
| `long` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap#getLapDurationMillis()()` Returns the total duration in milliseconds accumulated by the current `https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap`. |
| `int` | `https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap#getLapNumber()()` Returns the position of the current `https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap`, starting at 1. |

### Inherited methods

From [androidx.appsearch.builtintypes.Thing](https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing) `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/java/lang/String.html>` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getAlternateNames()()`

Returns an unmodifiable list of aliases, if any, for this item.
`long` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getCreationTimestampMillis()()`

Returns the creation timestamp, in milliseconds since Unix epoch, of this item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getDescription()()`

Returns a description of this item.
`int` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getDocumentScore()()`

Returns the intrinsic score (or importance) of this item.
`long` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getDocumentTtlMillis()()`

Returns the time-to-live timestamp, in milliseconds since `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getCreationTimestampMillis()`, for this item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getId()()`

Returns the unique identifier for this item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getImage()()`

Returns the URL for an image of this item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getName()()`

Returns the name of this item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getNamespace()()`

Returns the namespace (or logical grouping) for this item.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/appsearch/builtintypes/PotentialAction>` `@https://developer.android.com/reference/androidx/appsearch/app/ExperimentalAppSearchApi
https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getPotentialActions()()`

Returns the actions that can be taken on this object.
`@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/androidx/appsearch/builtintypes/Thing#getUrl()()`

Returns the deeplink URL of this item.

## Public constructors

### StopwatchLap

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

```
@ExperimentalAppSearchApi
public StopwatchLap(@NonNull StopwatchLap.BuilderBase<@NonNull ?> builder)
```

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

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap.BuilderBase<@https://developer.android.com/reference/androidx/annotation/NonNull ?> builder` | The builder to construct the `https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap` from. |

## Public methods

### getAccumulatedLapDurationMillis

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

```
public long getAccumulatedLapDurationMillis()
```

Returns the total duration in milliseconds accumulated by all the `https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap` instances up to and including this one.

### getLapDurationMillis

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

```
public long getLapDurationMillis()
```

Returns the total duration in milliseconds accumulated by the current `https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap`.

### getLapNumber

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

```
public int getLapNumber()
```

Returns the position of the current `https://developer.android.com/reference/androidx/appsearch/builtintypes/StopwatchLap`, starting at 1.