Stay organized with collections Save and categorize content based on your preferences.

DataKt

public final class DataKt


Summary

Public methods

static final boolean
<T extends Object> DataKt.hasKeyWithValueOfType(
    @NonNull Data receiver,
    @NonNull String key
)

Returns true if the instance of Data has a value corresponding to the given key with an expected type T.

static final @NonNull Data

Converts a list of pairs to a Data object.

Public methods

DataKt.hasKeyWithValueOfType

public static final boolean <T extends Object> DataKt.hasKeyWithValueOfType(
    @NonNull Data receiver,
    @NonNull String key
)

Returns true if the instance of Data has a value corresponding to the given key with an expected type T.

workDataOf

public static final @NonNull Data workDataOf(@NonNull Pair<@NonNull StringObject> pairs)

Converts a list of pairs to a Data object.

If multiple pairs have the same key, the resulting map will contain the value from the last of those pairs.

Entries of the map are iterated in the order they were specified.