PreferenceGroupKt
public final class PreferenceGroupKt
Summary
Public methods |
|
|---|---|
static final boolean |
contains(@NonNull PreferenceGroup receiver, @NonNull Preference preference)Returns |
static final void |
forEach(Performs the given action on each preference in this preference group. |
static final void |
forEachIndexed(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 |
static final T |
<T extends Preference> get(Returns the preference with |
static final @NonNull Sequence<@NonNull Preference> |
getChildren(@NonNull PreferenceGroup receiver)Returns a |
static final int |
getSize(@NonNull PreferenceGroup receiver)Returns the number of preferences in this preference group. |
static final boolean |
isEmpty(@NonNull PreferenceGroup receiver)Returns true if this preference group contains no preferences. |
static final boolean |
isNotEmpty(@NonNull PreferenceGroup receiver)Returns true if this preference group contains one or more preferences. |
static final @NonNull Iterator<@NonNull Preference> |
iterator(@NonNull PreferenceGroup receiver)Returns a |
static final void |
minusAssign(Removes |
static final void |
plusAssign(Adds |
Public methods
contains
public static final boolean contains(@NonNull PreferenceGroup receiver, @NonNull Preference preference)
Returns true if preference is found in this preference group.
forEach
public static final void forEach(
@NonNull PreferenceGroup receiver,
@NonNull Function1<@NonNull Preference, Unit> 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 Preference, Unit> action
)
Performs the given action on each preference in this preference group, providing its sequential index.
get
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. |
get
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 Preference> getChildren(@NonNull PreferenceGroup receiver)
Returns a Sequence over the preferences in this preference group.
getSize
public static final int getSize(@NonNull PreferenceGroup receiver)
Returns the number of preferences in this preference group.
isEmpty
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.
iterator
public static final @NonNull Iterator<@NonNull Preference> iterator(@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.