WithMaximumIntegralTemplate

io.github.cakelier.tuples.space.dsl.numeric.IntegralTemplate.WithMaximumIntegralTemplate
trait WithMaximumIntegralTemplate[A, B <: WithMinWithMaxIntegralTemplate[A, D], C <: WithMaxWithMultipleIntegralTemplate[A, D], D <: CompleteIntegralTemplate[A]](max: Either[A, A], withMinWithMaxBuilder: (Either[A, A], Either[A, A]) => B, withMaxWithMultipleBuilder: (Either[A, A], A) => C, converter: Either[A, A] => JsonIntegralTemplate[A])(implicit evidence$4: Numeric[A]) extends Template

The integral template for which the maximum value, either inclusive or exclusive, has been specified.

This template represents one for integral values where the maximum constraint, whether it be an inclusive or exclusive one, has been specified. Now, a minimum constraint can be specified, closing the now half-open interval, or a "multiple of" constraint can be specified, allowing to match only the values which are multiple of this number. Neither of this constraints are mandatory to apply. This will produce a template for which either the minimum and the maximum values have been specified, or the maximum and the "multiple of" values have been specified.

Type parameters

A

the actual integral type for which instantiating this type

B

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

C

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

D

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 already specified maximum, the function that returns a new template given the minimum and the maximum, the function that returns a new template given the maximum and the "multiple of" value 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): C

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" and the maximum 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 and the maximum 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 and maximum information

Converts this template to its corresponding JsonTemplate.

Converts this template to its corresponding JsonTemplate.

Attributes

Definition Classes