PreferenceGroupKt

Added in 1.0.0

public final class PreferenceGroupKt


Summary

Public methods

static final boolean

Returns true if preference is found in this preference group.

static final void
forEach(
    @NonNull PreferenceGroup receiver,
    @NonNull Function1<@NonNull PreferenceUnit> action
)

Performs the given action on each preference in this preference group.

static final void
forEachIndexed(
    @NonNull PreferenceGroup receiver,
    @NonNull Function2<@NonNull Integer, @NonNull PreferenceUnit> action
)

Performs the given action on each preference in this preference group, providing its sequential index.

static final @NonNull Preference
get(@NonNull PreferenceGroup receiver, int index)

Returns the preference at index.

static final T
<T extends Preference> get(
    @NonNull PreferenceGroup receiver,
    @NonNull CharSequence key
)

Returns the preference with key, or null if no preference with key is found.

static final @NonNull Sequence<@NonNull Preference>

Returns a Sequence over the preferences in this preference group.

static final int

Returns the number of preferences in this preference group.

static final boolean

Returns true if this preference group contains no preferences.

static final boolean

Returns true if this preference group contains one or more preferences.

static final @NonNull Iterator<@NonNull Preference>

Returns a MutableIterator over the preferences in this preference group.

static final void
minusAssign(
    @NonNull PreferenceGroup receiver,
    @NonNull Preference preference
)

Removes preference from this preference group.

static final void
plusAssign(
    @NonNull PreferenceGroup receiver,
    @NonNull Preference preference
)

Adds preference to this preference group.

Public methods

public static final boolean contains(@NonNull PreferenceGroup receiver, @NonNull Preference preference)

Returns true if preference is found in this preference group.

public static final void forEach(
    @NonNull PreferenceGroup receiver,
    @NonNull Function1<@NonNull PreferenceUnit> action
)

Performs the given action on each preference in this preference group.

forEachIndexed

public static final void forEachIndexed(
    @NonNull PreferenceGroup receiver,
    @NonNull Function2<@NonNull Integer, @NonNull PreferenceUnit> action
)

Performs the given action on each preference in this preference group, providing its sequential index.

public static final @NonNull Preference get(@NonNull PreferenceGroup receiver, int index)

Returns the preference at index.

Throws
kotlin.IndexOutOfBoundsException

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

public static final T <T extends Preference> get(
    @NonNull PreferenceGroup receiver,
    @NonNull CharSequence key
)

Returns the preference with key, or null if no preference with key is found.

getChildren

public static final @NonNull Sequence<@NonNull PreferencegetChildren(@NonNull PreferenceGroup receiver)

Returns a Sequence over the preferences in this preference group.

public static final int getSize(@NonNull PreferenceGroup receiver)

Returns the number of preferences in this preference group.

public static final boolean isEmpty(@NonNull PreferenceGroup receiver)

Returns true if this preference group contains no preferences.

isNotEmpty

public static final boolean isNotEmpty(@NonNull PreferenceGroup receiver)

Returns true if this preference group contains one or more preferences.

public static final @NonNull Iterator<@NonNull Preferenceiterator(@NonNull PreferenceGroup receiver)

Returns a MutableIterator over the preferences in this preference group.

minusAssign

public static final void minusAssign(
    @NonNull PreferenceGroup receiver,
    @NonNull Preference preference
)

Removes preference from this preference group.

plusAssign

public static final void plusAssign(
    @NonNull PreferenceGroup receiver,
    @NonNull Preference preference
)

Adds preference to this preference group.