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] = T match {
case Byte => Divisible[2]
case Short => Divisible[2]
case Int => Divisible[2]
case Long => Divisible[2L]
case Float => Divisible[2.0f]
case Double => Divisible[2.0d]
}
Abstraction over Divisible[2]. Supports all Number subtypes.
Abstraction over Divisible[2]. Supports all Number subtypes.
- Type Params
- T
the primitive's type.
type Natural[T] = Constrained[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.