public final class

Player.Events

extends java.lang.Object

 java.lang.Object

↳androidx.media3.common.Player.Events

Overview

A set of events.

Summary

Constructors
publicEvents(FlagSet flags)

Creates an instance.

Methods
public booleancontains(int event)

Returns whether the given Player.Event occurred.

public booleancontainsAny(int[] events[])

Returns whether any of the given events occurred.

public booleanequals(java.lang.Object obj)

public intget(int index)

Returns the Player.Event at the given index.

public inthashCode()

public intsize()

Returns the number of events in the set.

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

Constructors

public Events(FlagSet flags)

Creates an instance.

Parameters:

flags: The FlagSet containing the events.

Methods

public boolean contains(int event)

Returns whether the given Player.Event occurred.

Parameters:

event: The Player.Event.

Returns:

Whether the Player.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 Player.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 Player.Events.size() (exclusive).

Returns:

The Player.Event at the given index.

public int hashCode()

public boolean equals(java.lang.Object obj)