numeric

io.github.iltotore.iron.constraint.numeric
object numeric

Number-related constraints.

Attributes

Source
numeric.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
numeric.type

Members list

Type members

Classlikes

final class Divide[V]

Tests if the input is a divisor of V.

Tests if the input is a divisor of V.

Type parameters

V

the expected multiple of the given input.

Attributes

See also
Companion
object
Source
numeric.scala
Supertypes
class Object
trait Matchable
class Any
object Divide

Attributes

Companion
class
Source
numeric.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Divide.type
final class Greater[V]

Tests strict superiority.

Tests strict superiority.

Type parameters

V

the value the input must be greater than.

Attributes

Companion
object
Source
numeric.scala
Supertypes
class Object
trait Matchable
class Any
object Greater

Attributes

Companion
class
Source
numeric.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Greater.type
final class Infinity

Tests if the input is whether +infinity or -infinity.

Tests if the input is whether +infinity or -infinity.

Attributes

Companion
object
Source
numeric.scala
Supertypes
class Object
trait Matchable
class Any
object Infinity

Attributes

Companion
class
Source
numeric.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Infinity.type
object Interval

Attributes

Source
numeric.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Interval.type
final class Less[V]

Tests strict inferiority.

Tests strict inferiority.

Type parameters

V

the value the input must be less than.

Attributes

Companion
object
Source
numeric.scala
Supertypes
class Object
trait Matchable
class Any
object Less

Attributes

Companion
class
Source
numeric.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Less.type
final class Multiple[V]

Tests if the input is a multiple of V.

Tests if the input is a multiple of V.

Type parameters

V

the expected divisor of the given input.

Attributes

See also
Companion
object
Source
numeric.scala
Supertypes
class Object
trait Matchable
class Any
object Multiple

Attributes

Companion
class
Source
numeric.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Multiple.type
final class NaN

Tests if the input is not a representable number.

Tests if the input is not a representable number.

Attributes

Companion
object
Source
numeric.scala
Supertypes
class Object
trait Matchable
class Any
object NaN

Attributes

Companion
class
Source
numeric.scala
Supertypes
class Object
trait Matchable
class Any
Self type
NaN.type

Types

type Even = Multiple[2]

Tests if the input is even (a multiple of 2).

Tests if the input is even (a multiple of 2).

Attributes

Source
numeric.scala
type GreaterEqual[V] = DescribedAs[Greater[V] | StrictEqual[V], "Should be greater than or equal to " + V]

Tests non-strict superiority.

Tests non-strict superiority.

Type parameters

V

the value the input must be greater than or equal to.

Attributes

Source
numeric.scala
type LessEqual[V] = DescribedAs[Less[V] | StrictEqual[V], "Should be less than or equal to " + V]

Tests non-strict inferiority.

Tests non-strict inferiority.

Type parameters

V

the value the input must be less than or equal to.

Attributes

Source
numeric.scala
type Negative = DescribedAs[Less[0], "Should be strictly negative"]

Tests if the input is strictly negative.

Tests if the input is strictly negative.

Attributes

Source
numeric.scala
type Negative0 = DescribedAs[LessEqual[0], "Should be negative or zero"]

Tests if the input is negative or zero.

Tests if the input is negative or zero.

Attributes

Source
numeric.scala
type Odd = Not[Even]

Tests if the input is odd (not a multiple of 2).

Tests if the input is odd (not a multiple of 2).

Attributes

Source
numeric.scala
type Positive = DescribedAs[Greater[0], "Should be strictly positive"]

Tests if the input is strictly positive.

Tests if the input is strictly positive.

Attributes

Source
numeric.scala
type Positive0 = DescribedAs[GreaterEqual[0], "Should be positive or zero"]

Tests if the input is positive or zero.

Tests if the input is positive or zero.

Attributes

Source
numeric.scala