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 boolean
contains(@com.google.android.exoplayer2.analytics.AnalyticsListener.EventFlags int event)
Returns whether the given event occurred.boolean
containsAny(@com.google.android.exoplayer2.analytics.AnalyticsListener.EventFlags int... events)
Returns whether any of the given events occurred.@com.google.android.exoplayer2.analytics.AnalyticsListener.EventFlags int
get(int index)
Returns theevent
at the given index.AnalyticsListener.EventTime
getEventTime(@com.google.android.exoplayer2.analytics.AnalyticsListener.EventFlags int event)
Returns theAnalyticsListener.EventTime
for the specified event.int
size()
Returns the number of events in the set.
-
-
-
Constructor Detail
-
Events
public Events(FlagSet flags, SparseArray<AnalyticsListener.EventTime> eventTimes)
Creates an instance.- Parameters:
flags
- TheFlagSet
containing theAnalyticsListener.EventFlags
in the set.eventTimes
- A map fromAnalyticsListener.EventFlags
toAnalyticsListener.EventTime
. Must at least contain all the events recorded inflags
. Events that are not recorded inflags
are ignored.
-
-
Method Detail
-
getEventTime
public AnalyticsListener.EventTime getEventTime(@EventFlags @com.google.android.exoplayer2.analytics.AnalyticsListener.EventFlags int event)
Returns theAnalyticsListener.EventTime
for the specified event.- Parameters:
event
- Theevent
.- Returns:
- The
AnalyticsListener.EventTime
of this event.
-
contains
public boolean contains(@EventFlags @com.google.android.exoplayer2.analytics.AnalyticsListener.EventFlags int event)
Returns whether the given event occurred.- Parameters:
event
- Theevent
.- Returns:
- Whether the event occurred.
-
containsAny
public boolean containsAny(@EventFlags @com.google.android.exoplayer2.analytics.AnalyticsListener.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 @com.google.android.exoplayer2.analytics.AnalyticsListener.EventFlags int get(int index)
Returns theevent
at the given index.Although index-based access is possible, it doesn't imply a particular order of these events.
-
-