WithMultipleIntegralTemplate

io.github.cakelier.tuples.space.dsl.numeric.IntegralTemplate.WithMultipleIntegralTemplate
trait WithMultipleIntegralTemplate[A, B <: WithMinWithMultipleIntegralTemplate[A, D], C <: WithMaxWithMultipleIntegralTemplate[A, D], D <: CompleteIntegralTemplate[A]](multipleOf: A, withMinWithMultipleBuilder: (Either[A, A], A) => B, withMaxWithMultipleBuilder: (Either[A, A], A) => C, converter: Option[A] => JsonIntegralTemplate[A])(implicit evidence$2: Integral[A]) extends Template

The integral template for which the "multiple of" value has been specified.

This template represents one for integral values where the "multiple of" constraint has been specified. Now, a minimum or a maximum constraint can be specified, creating a range of acceptable values for the template to match. Neither of this constraints are mandatory to apply. This will produce a template for which either the minimum and the "multiple of" 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 divisor 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 "multiple of" value, the function that returns a new template given the minimum and the "multiple of" value, 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 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 "multiple of" 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 the "multiple of" 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 and the "multiple of" 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 and the "multiple of" information

Converts this template to its corresponding JsonTemplate.

Converts this template to its corresponding JsonTemplate.

Attributes

Definition Classes