WithMinWithMaxIntegralTemplate

io.github.cakelier.tuples.space.dsl.numeric.IntegralTemplate.WithMinWithMaxIntegralTemplate
trait WithMinWithMaxIntegralTemplate[A, B <: CompleteIntegralTemplate[A]](min: Either[A, A], max: Either[A, A], completeBuilder: (Either[A, A], Either[A, A], A) => B, converter: (Either[A, A], Either[A, A]) => JsonNumericTemplate[A])(implicit evidence$5: Numeric[A]) extends Template

The integral template for which the minimum and the maximum values, either inclusive or exclusive, have been specified.

This template represents one for integral values where the minimum and the maximum constraints, whether they are inclusive or exclusive, have been specified. Now, a "multiple of" constraint can be specified, allowing to match only the values which are multiple of this number. This constraints is not mandatory to apply. This will produce a "complete" template for which no more constraints can be specified.

Type parameters

A

the actual integral type for which instantiating this type

B

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 minimum and maximum values, the function that returns a new template given the minimum, 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): B

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 "terminal" template, which has stored the minimum, the maximum and the "multiple of" information

Converts this template to its corresponding JsonTemplate.

Converts this template to its corresponding JsonTemplate.

Attributes

Definition Classes