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


An AppSearch document representing a StopwatchLap entity.

A 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 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

Builder for StopwatchLap.

Public methods

long

Returns the total duration in milliseconds accumulated by all the StopwatchLap instances up to and including this one.

long

Returns the total duration in milliseconds accumulated by the current StopwatchLap.

int

Returns the position of the current StopwatchLap, starting at 1.

Inherited methods

From androidx.appsearch.builtintypes.Thing
@NonNull List<String>

Returns an unmodifiable list of aliases, if any, for this item.

long

Returns the creation timestamp, in milliseconds since Unix epoch, of this item.

@Nullable String

Returns a description of this item.

int

Returns the intrinsic score (or importance) of this item.

long

Returns the time-to-live timestamp, in milliseconds since getCreationTimestampMillis, for this item.

@NonNull String

Returns the unique identifier for this item.

@Nullable String

Returns the URL for an image of this item.

@Nullable String

Returns the name of this item.

@NonNull String

Returns the namespace (or logical grouping) for this item.

@NonNull List<PotentialAction>

Returns the actions that can be taken on this object.

@Nullable String

Returns the deeplink URL of this item.

Public methods

getAccumulatedLapDurationMillis

Added in 1.1.0-alpha07
public long getAccumulatedLapDurationMillis()

Returns the total duration in milliseconds accumulated by all the StopwatchLap instances up to and including this one.

getLapDurationMillis

Added in 1.1.0-alpha07
public long getLapDurationMillis()

Returns the total duration in milliseconds accumulated by the current StopwatchLap.

getLapNumber

Added in 1.1.0-alpha07
public int getLapNumber()

Returns the position of the current StopwatchLap, starting at 1.