Filter

sealed class Filter<T>(val name: String, var state: T)

A sealed class representing a filter with a name and a state.

This class originally came from Tachiyomi.

Parameters

name

The name of the filter.

state

The state of the filter.

Inheritors

Constructors

Link copied to clipboard
protected constructor(name: String, state: T)

Types

Link copied to clipboard
open class CheckBox(name: String, state: Boolean = false) : Filter<Boolean>

An abstract class representing a checkbox filter.

Link copied to clipboard
open class Select<V>(name: String, val options: List<V>, state: Int = 0) : Filter<Int>

An abstract class representing a selectable filter.

Link copied to clipboard
open class Sort<V>(name: String, val options: List<V>, state: Filter.Sort.Selection? = null) : Filter<Filter.Sort.Selection?>

An abstract class representing a sort filter.

Link copied to clipboard
open class TriState(name: String, state: Int = STATE_UNSELECTED) : Filter<Int>

An abstract class representing a tri-state filter.

Properties

Link copied to clipboard
Link copied to clipboard
var state: T

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int