constraint
object constraint
class Object
trait Matchable
class Any
Type members
Classlikes
Constraint: checks if the input value is divisible by V
Constraint: checks if the input value is divisible by V
Constraint: checks if the input value is greater than V.
Constraint: checks if the input value is greater than V.
Constraint: checks if the input value is greater or equal to V.
Constraint: checks if the input value is greater or equal to V.
Constraint: checks if the input value is less than V.
Constraint: checks if the input value is less than V.
Types
type Even[T] = Constrained[T, T match {
case Byte => Divisible[2]
case Short => Divisible[2]
case Int => Divisible[2]
case Long => Divisible[2L]
}]
Alias for T % 2
. Supports all non-floating primitives.
Alias for T % 2
. Supports all non-floating primitives.
- Type Params
- T
the primitive's type.
type Natural[T] = T >= T match {
case Byte => GreaterEqual[0]
case Short => GreaterEqual[0]
case Int => GreaterEqual[0]
case Long => GreaterEqual[0L]
}
Alias for T >= 0
. Supports all non-floating primitives.
Alias for T >= 0
. Supports all non-floating primitives.
- Type Params
- T
the primitive's type.