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

SelectionPredicates

public final class SelectionPredicates


Utility class for creating SelectionPredicate instances. Provides default implementations for common cases like "single selection" and "select anything".

Summary

Public methods

static @NonNull SelectionTracker.SelectionPredicate<K>

Returns a selection predicate that allows multiples items to be selected, without any restrictions on which items can be selected.

static @NonNull SelectionTracker.SelectionPredicate<K>

Returns a selection predicate that allows a single item to be selected, without any restrictions on which item can be selected.

Public methods

createSelectAnything

public static @NonNull SelectionTracker.SelectionPredicate<K> <K> createSelectAnything()

Returns a selection predicate that allows multiples items to be selected, without any restrictions on which items can be selected.

Parameters
<K>

Selection key type. @see StorageStrategy for supported types.

createSelectSingleAnything

public static @NonNull SelectionTracker.SelectionPredicate<K> <K> createSelectSingleAnything()

Returns a selection predicate that allows a single item to be selected, without any restrictions on which item can be selected.

Parameters
<K>

Selection key type. @see StorageStrategy for supported types.