MenuKt

public final class MenuKt


Summary

Public fields

final @NonNull Sequence<@NonNull MenuItem>

Returns a Sequence over the items in this menu.

final int

Returns the number of items in this menu.

Public methods

static final boolean
MenuKt.contains(Menu receiver, MenuItem item)

Returns true if item is found in this menu.

static final void
MenuKt.forEach(Menu receiver, Function1<MenuItemUnit> action)

Performs the given action on each item in this menu.

static final void
MenuKt.forEachIndexed(
    Menu receiver,
    Function2<IntegerMenuItemUnit> action
)

Performs the given action on each item in this menu, providing its sequential index.

static final @NonNull MenuItem
MenuKt.get(Menu receiver, int index)

Returns the menu at index.

static final boolean
MenuKt.isEmpty(Menu receiver)

Returns true if this menu contains no items.

static final boolean

Returns true if this menu contains one or more items.

static final @NonNull Iterator<@NonNull MenuItem>
MenuKt.iterator(Menu receiver)

Returns a MutableIterator over the items in this menu.

static final void
MenuKt.minusAssign(Menu receiver, MenuItem item)

Removes item from this menu.

Public fields

children

public final @NonNull Sequence<@NonNull MenuItemchildren

Returns a Sequence over the items in this menu.

size

public final int size

Returns the number of items in this menu.

Public methods

MenuKt.contains

public static final boolean MenuKt.contains(Menu receiver, MenuItem item)

Returns true if item is found in this menu.

MenuKt.forEach

public static final void MenuKt.forEach(Menu receiver, Function1<MenuItemUnit> action)

Performs the given action on each item in this menu.

MenuKt.forEachIndexed

public static final void MenuKt.forEachIndexed(
    Menu receiver,
    Function2<IntegerMenuItemUnit> action
)

Performs the given action on each item in this menu, providing its sequential index.

MenuKt.get

public static final @NonNull MenuItem MenuKt.get(Menu receiver, int index)

Returns the menu at index.

Throws
kotlin.IndexOutOfBoundsException

if index is less than 0 or greater than or equal to the count.

MenuKt.isEmpty

public static final boolean MenuKt.isEmpty(Menu receiver)

Returns true if this menu contains no items.

MenuKt.isNotEmpty

public static final boolean MenuKt.isNotEmpty(Menu receiver)

Returns true if this menu contains one or more items.

MenuKt.iterator

public static final @NonNull Iterator<@NonNull MenuItemMenuKt.iterator(Menu receiver)

Returns a MutableIterator over the items in this menu.

MenuKt.minusAssign

public static final void MenuKt.minusAssign(Menu receiver, MenuItem item)

Removes item from this menu.