public final class

AnalyticsListener.Events

extends java.lang.Object

 java.lang.Object

↳androidx.media3.exoplayer.analytics.AnalyticsListener.Events

Overview

A set of AnalyticsListener.EventFlags.

Summary

Constructors
publicEvents(FlagSet flags, <any> eventTimes)

Creates an instance.

Methods
public booleancontains(int event)

Returns whether the given event occurred.

public booleancontainsAny(int[] events[])

Returns whether any of the given events occurred.

public intget(int index)

Returns the event at the given index.

public AnalyticsListener.EventTimegetEventTime(int event)

Returns the AnalyticsListener.EventTime for the specified event.

public intsize()

Returns the number of events in the set.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Events(FlagSet flags, <any> eventTimes)

Creates an instance.

Parameters:

flags: The FlagSet containing the AnalyticsListener.EventFlags in the set.
eventTimes: A map from AnalyticsListener.EventFlags to AnalyticsListener.EventTime. Must at least contain all the events recorded in flags. Events that are not recorded in flags are ignored.

Methods

public AnalyticsListener.EventTime getEventTime(int event)

Returns the AnalyticsListener.EventTime for the specified event.

Parameters:

event: The event.

Returns:

The AnalyticsListener.EventTime of this event.

public boolean contains(int event)

Returns whether the given event occurred.

Parameters:

event: The event.

Returns:

Whether the event occurred.

public boolean containsAny(int[] events[])

Returns whether any of the given events occurred.

Parameters:

events: The events.

Returns:

Whether any of the events occurred.

public int size()

Returns the number of events in the set.

public int get(int index)

Returns the event at the given index.

Although index-based access is possible, it doesn't imply a particular order of these events.

Parameters:

index: The index. Must be between 0 (inclusive) and AnalyticsListener.Events.size() (exclusive).

Returns:

The event at the given index.