EmptyIntegralTemplate

io.github.cakelier.tuples.space.dsl.numeric.IntegralTemplate.EmptyIntegralTemplate
trait EmptyIntegralTemplate[A, B <: WithMinimumIntegralTemplate[A, D, E, H], C <: WithMaximumIntegralTemplate[A, D, F, H], D <: WithMinWithMaxIntegralTemplate[A, H], E <: WithMinWithMultipleIntegralTemplate[A, H], F <: WithMaxWithMultipleIntegralTemplate[A, H], G <: WithMultipleIntegralTemplate[A, E, F, H], H <: CompleteIntegralTemplate[A]](withMinBuilder: Either[A, A] => B, withMaxBuilder: Either[A, A] => C, withMultipleBuilder: A => G, converter: () => JsonIntegralTemplate[A])(implicit evidence$1: Integral[A]) extends Template

The "empty" integral template, capable of matching any value of the given integral type.

This is the starting template from which creating any other integral template by specifying more and more constraints. Being so, it is allowed to add a minimum value, either inclusive or exclusive, or a maximum value, either inclusive or exclusive, to create a new template from this. It is also allowed to specify a number of which the matched integral number should be multiple of for creating a new template.

Type parameters

A

the actual integral type for which instantiating this type

B

the actual type of the template for which the minimum has been specified

C

the actual type of the template for which the maximum has been specified

D

the actual type of the template for which either the minimum and the maximum have been specified altogether

E

the actual type of the template for which either the minimum and the divisor have been specified altogether

F

the actual type of the template for which either the divisor and the maximum have been specified altogether

G

the actual type of the template for which the divisor has been specified

H

the actual type of the template for which all possible constraints have been specified altogether

Attributes

Constructor

creates a new instance of this trait given the function that returns a new template given the minimum, the one that returns a new template given the maximum, the one that returns a new template given the divisor and the one that returns a new JsonIntegralTemplate from this one

Graph
Supertypes
trait Template
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Concrete methods

def div(multipleOf: A): G

Adds the number that the integral value should be multiple of to match the built template.

Adds the number that the integral value should be multiple of to match the built template.

Value parameters

multipleOf

the number that the integral value should be multiple of to match the built template

Attributes

Returns

a template which has stored the "multiple of" information

def gt(min: A): B

Adds the exclusive minimum that the integral value should satisfy to match the built template.

Adds the exclusive minimum that the integral value should satisfy to match the built template.

Value parameters

min

the exclusive minimum that the integral value should satisfy to match the built template

Attributes

Returns

a template which has stored the exclusive minimum information

def gte(min: A): B

Adds the inclusive minimum that the integral value should satisfy to match the built template.

Adds the inclusive minimum that the integral value should satisfy to match the built template.

Value parameters

min

the inclusive minimum that the integral value should satisfy to match the built template

Attributes

Returns

a template which has stored the inclusive minimum information

def lt(max: A): C

Adds the exclusive maximum that the integral value should satisfy to match the built template.

Adds the exclusive maximum that the integral value should satisfy to match the built template.

Value parameters

max

the exclusive maximum that the integral value should satisfy to match the built template

Attributes

Returns

a template which has stored the exclusive maximum information

def lte(max: A): C

Adds the inclusive maximum that the integral value should satisfy to match the built template.

Adds the inclusive maximum that the integral value should satisfy to match the built template.

Value parameters

max

the inclusive maximum that the integral value should satisfy to match the built template

Attributes

Returns

a template which has stored the inclusive maximum information

Converts this template to its corresponding JsonTemplate.

Converts this template to its corresponding JsonTemplate.

Attributes

Definition Classes