AnalyticsListener.Events


@UnstableApi
class AnalyticsListener.Events


A set of EventFlags.

Summary

Public constructors

Events(
    flags: FlagSet!,
    eventTimes: SparseArray<AnalyticsListener.EventTime!>!
)

Creates an instance.

Public functions

Boolean

Returns whether the given event occurred.

Boolean

Returns whether any of the given events occurred.

Int

Returns the event at the given index.

AnalyticsListener.EventTime!

Returns the EventTime for the specified event.

Int

Returns the number of events in the set.

Public constructors

Events

Events(
    flags: FlagSet!,
    eventTimes: SparseArray<AnalyticsListener.EventTime!>!
)

Creates an instance.

Parameters
flags: FlagSet!

The FlagSet containing the EventFlags in the set.

eventTimes: SparseArray<AnalyticsListener.EventTime!>!

A map from EventFlags to EventTime. Must at least contain all the events recorded in flags. Events that are not recorded in flags are ignored.

Public functions

contains

fun contains(@AnalyticsListener.EventFlags event: Int): Boolean

Returns whether the given event occurred.

Parameters
@AnalyticsListener.EventFlags event: Int

The event.

Returns
Boolean

Whether the event occurred.

containsAny

fun containsAny(@AnalyticsListener.EventFlags events: IntArray!): Boolean

Returns whether any of the given events occurred.

Parameters
@AnalyticsListener.EventFlags events: IntArray!

The events.

Returns
Boolean

Whether any of the events occurred.

get

@AnalyticsListener.EventFlags
fun get(index: Int): Int

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: Int

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

Returns
Int

The event at the given index.

getEventTime

fun getEventTime(@AnalyticsListener.EventFlags event: Int): AnalyticsListener.EventTime!

Returns the EventTime for the specified event.

Parameters
@AnalyticsListener.EventFlags event: Int

The event.

Returns
AnalyticsListener.EventTime!

The EventTime of this event.

size

fun size(): Int

Returns the number of events in the set.