Class AnalyticsListener.Events
- java.lang.Object
-
- com.google.android.exoplayer2.analytics.AnalyticsListener.Events
-
- Enclosing interface:
- AnalyticsListener
public static final class AnalyticsListener.Events extends Object
A set ofAnalyticsListener.EventFlags.
-
-
Constructor Summary
Constructors Constructor Description Events(FlagSet flags, SparseArray<AnalyticsListener.EventTime> eventTimes)Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(int event)Returns whether the given event occurred.booleancontainsAny(int... events)Returns whether any of the given events occurred.intget(int index)Returns theeventat the given index.AnalyticsListener.EventTimegetEventTime(int event)Returns theAnalyticsListener.EventTimefor the specified event.intsize()Returns the number of events in the set.
-
-
-
Constructor Detail
-
Events
public Events(FlagSet flags, SparseArray<AnalyticsListener.EventTime> eventTimes)
Creates an instance.- Parameters:
flags- TheFlagSetcontaining theAnalyticsListener.EventFlagsin the set.eventTimes- A map fromAnalyticsListener.EventFlagstoAnalyticsListener.EventTime. Must at least contain all the events recorded inflags. Events that are not recorded inflagsare ignored.
-
-
Method Detail
-
getEventTime
public AnalyticsListener.EventTime getEventTime(@EventFlags int event)
Returns theAnalyticsListener.EventTimefor the specified event.- Parameters:
event- Theevent.- Returns:
- The
AnalyticsListener.EventTimeof this event.
-
contains
public boolean contains(@EventFlags int event)
Returns whether the given event occurred.- Parameters:
event- Theevent.- Returns:
- Whether the event occurred.
-
containsAny
public boolean containsAny(@EventFlags int... events)
Returns whether any of the given events occurred.- Parameters:
events- Theevents.- Returns:
- Whether any of the events occurred.
-
size
public int size()
Returns the number of events in the set.
-
get
@EventFlags public int get(int index)
Returns theeventat the given index.Although index-based access is possible, it doesn't imply a particular order of these events.
-
-