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

Returns true if item is found in this menu.

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

Performs the given action on each item in this menu.

static final void
MenuKt.forEachIndexed(
    @NonNull Menu receiver,
    @NonNull Function2<@NonNull Integer, @NonNull MenuItemUnit> action
)

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

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

Returns the menu at index.

static final boolean

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>

Returns a MutableIterator over the items in this menu.

static final void

Removes item from this menu.

Public fields

children

@NonNull
public final @NonNull Sequence<@NonNull MenuItemchildren

Returns a Sequence over the items in this menu.

size

@NonNull
public final int size

Returns the number of items in this menu.

Public methods

MenuKt.contains

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

Returns true if item is found in this menu.

MenuKt.forEach

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

Performs the given action on each item in this menu.

MenuKt.forEachIndexed

@NonNull
public static final void MenuKt.forEachIndexed(
    @NonNull Menu receiver,
    @NonNull Function2<@NonNull Integer, @NonNull MenuItemUnit> action
)

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

MenuKt.get

@NonNull
public static final MenuItem MenuKt.get(@NonNull 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

@NonNull
public static final boolean MenuKt.isEmpty(@NonNull Menu receiver)

Returns true if this menu contains no items.

MenuKt.isNotEmpty

@NonNull
public static final boolean MenuKt.isNotEmpty(@NonNull Menu receiver)

Returns true if this menu contains one or more items.

MenuKt.iterator

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

Returns a MutableIterator over the items in this menu.

MenuKt.minusAssign

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

Removes item from this menu.