ComparableScrewdriver<E extends Comparable> extension
provides extensions for Comparable
- on
-
- E
Methods
-
coerceAtLeast(
E minimum) → E -
Ensures that this value is not less than the specified
minimum
value. returns this value if it's greater than or equal to theminimum
value or theminimum
value otherwise. -
coerceAtMost(
E maximum) → E -
Ensures that this value is not greater than the specified
maximum
value. Returns this value if it's less than or equal to themaximum
value or themaximum
value otherwise. -
coerceIn(
E min, E max) → E -
Ensures that this value lies in the specified range
min
<-->max
. Return this value if it's in the range, ormin
value if this value is less thanmin
value, ormax
value if this value is greater thanmax
value.
Operators
-
operator <(
E other) → bool -
Returns true if
other
object is less than this. -
operator <=(
E other) → bool -
Returns true if
other
object is less than or equal to this. -
operator >(
E other) → bool -
Returns true if
other
object is greater than this. -
operator >=(
E other) → bool -
Returns true if
other
object is greater than or equal to this.