Player.Events


class Player.Events


A set of events.

Summary

Public constructors

Creates an instance.

Public functions

Boolean

Returns whether the given Event occurred.

Boolean

Returns whether any of the given events occurred.

Boolean

Returns whether any of the given Player.Events occurred.

Boolean
equals(obj: Any?)
Int

Returns the Event at the given index.

Int
Int

Returns the number of events in the set.

Public constructors

Events

@UnstableApi
Events(flags: FlagSet!)

Creates an instance.

Parameters
flags: FlagSet!

The FlagSet containing the events.

Public functions

contains

fun contains(@Player.Event event: Int): Boolean

Returns whether the given Event occurred.

Parameters
@Player.Event event: Int

The Event.

Returns
Boolean

Whether the Event occurred.

containsAny

fun containsAny(@Player.Event events: IntArray!): Boolean

Returns whether any of the given events occurred.

Parameters
@Player.Event events: IntArray!

The events.

Returns
Boolean

Whether any of the events occurred.

containsAny

fun containsAny(events: Player.Events!): Boolean

Returns whether any of the given Player.Events occurred.

Parameters
events: Player.Events!

The Player.Events.

Returns
Boolean

Whether any of the Player.Events occurred.

equals

fun equals(obj: Any?): Boolean

get

@Player.Event
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.

Throws
java.lang.IndexOutOfBoundsException

If index is outside the allowed range.

hashCode

fun hashCode(): Int

size

fun size(): Int

Returns the number of events in the set.