viewtify.preference
Preferences.ComparablePreference
<V
>
V
>Preference value for Comparable
.
ComparablePreference
(V
defaultValue
)
V
defaultValue
)V defaultValue |
Hide constructor.
require
(FunctionV
, V
requirement
)
ComparablePreferenceV
FunctionV
, V
requirement
)V
Function requirement |
|
ComparablePreference |
Chainable API. |
Add requirement on this preference.
requireMax
(V
max
)
ComparablePreferenceV
V
max
)V
V max |
A maximum value. |
ComparablePreference |
Chainable API. |
This is the maximum value that can be set. If it is greater than this value, this maximum value will be set instead.
requireMin
(V
min
)
ComparablePreferenceV
V
min
)V
V min |
A minimum value. |
ComparablePreference |
Chainable API. |
This is the minimum value that can be set. If it is less than this value, this minimum value will be set instead.
requireBetween
(V
min
, V
max
)
ComparablePreferenceV
V
min
, V
max
)V
V min |
A minimum value. |
V max |
A maximum value. |
ComparablePreference |
Chainable API. |
The range of possible values. If a value outside this range is set, the closest value to this range will be set instead.