ScanFilterState

Represents the state of the scanner, including available filters and sorting options.

This interface provides methods to check if a filter is selected and to retrieve the active sorting comparator based on the currently selected sorting option.

Properties

Link copied to clipboard

The active sorting option.

Link copied to clipboard
abstract val dynamicFilters: List<Filter>

The list of filters that can be applied to the scanner results.

Link copied to clipboard
abstract val filter: ConjunctionFilterScope.() -> Unit

The filter to be applied to all scan results.

Link copied to clipboard
abstract val isEmpty: Boolean

A flag indicating whether any dynamic filters or sorting options are selected.

Link copied to clipboard
abstract val scanResultFilter: (ScanResult) -> Boolean

A filter to be applied to each scan result after it has been filtered by the filter.

Link copied to clipboard

The list of sorting options that can be applied to the results.

Functions

Link copied to clipboard
abstract fun clear()

Clears all selected filters and sorting options.

Link copied to clipboard
abstract fun isFilterSelected(index: Int): Boolean

Checks if the filter at the given index is selected.

Link copied to clipboard
abstract fun sortBy(sortingOption: SortingOption)

Sets the active sorting option.

Link copied to clipboard
abstract fun toggleFilter(index: Int)

Toggles the selection state of the filter at the given index.