CreationExtrasKt

Added in 2.9.0-alpha08

public final class CreationExtrasKt


Summary

Public methods

static final boolean
contains(
    @NonNull CreationExtras receiver,
    @NonNull CreationExtras.Key<@NonNull ?> key
)

Checks if the CreationExtras contains the given key.

static final @NonNull MutableCreationExtras
plus(
    @NonNull CreationExtras receiver,
    @NonNull CreationExtras creationExtras
)

Creates a new read-only CreationExtras by replacing or adding entries to this extras from another creationExtras.

static final void
plusAssign(
    @NonNull MutableCreationExtras receiver,
    @NonNull CreationExtras creationExtras
)

Appends or replaces all entries from the given creationExtras in this mutable extras.

Public methods

public static final boolean contains(
    @NonNull CreationExtras receiver,
    @NonNull CreationExtras.Key<@NonNull ?> key
)

Checks if the CreationExtras contains the given key.

This method allows to use the key in creationExtras syntax for checking whether an key is contained in the CreationExtras.

public static final @NonNull MutableCreationExtras plus(
    @NonNull CreationExtras receiver,
    @NonNull CreationExtras creationExtras
)

Creates a new read-only CreationExtras by replacing or adding entries to this extras from another creationExtras.

The returned CreationExtras preserves the entry iteration order of the original CreationExtras.

Those entries of another creationExtras that are missing in this extras are iterated in the end in the order of that creationExtras.

public static final void plusAssign(
    @NonNull MutableCreationExtras receiver,
    @NonNull CreationExtras creationExtras
)

Appends or replaces all entries from the given creationExtras in this mutable extras.