AnimeFilter

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

Inheritors

Constructors

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

Types

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

A checkbox control, similar to HTML's <input type="checkbox">.

Link copied to clipboard
abstract class Group<V>(name: String, state: List<V>) : AnimeFilter<List<V>>

A group of filters. Usually used for multiple related CheckBox/TriState instances, like in a genres filter

Link copied to clipboard
open class Header(name: String) : AnimeFilter<Any>

A simple header. Useful for separating sections in the list or showing any note or warning to the user.

Link copied to clipboard
abstract class Select<V>(name: String, val values: Array<V>, state: Int = 0) : AnimeFilter<Int>

A select control, similar to HTML's <select>. Only one item can be selected.

Link copied to clipboard
open class Separator(name: String = "") : AnimeFilter<Any>

A line separator. Useful for visual distinction between sections.

Link copied to clipboard
abstract class Sort(name: String, val values: Array<String>, state: AnimeFilter.Sort.Selection? = null) : AnimeFilter<AnimeFilter.Sort.Selection?>

A control for sorting, with support for the ordering. The state indicates which item index is selected and if the sorting is ascending.

Link copied to clipboard
abstract class Text(name: String, state: String = "") : AnimeFilter<String>

A text control, similar to HTML's <input type="text">.

Link copied to clipboard
abstract class TriState(name: String, state: Int = STATE_IGNORE) : AnimeFilter<Int>

A enhanced checkbox control that supports an excluding state. The state can be compared with STATE_IGNORE, STATE_INCLUDE and STATE_EXCLUDE constants of the class.

Properties

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