WithMinimumNumericTemplate

io.github.cakelier.tuples.space.dsl.numeric.NumericTemplate.WithMinimumNumericTemplate
trait WithMinimumNumericTemplate[A, B <: CompleteNumericTemplate[A]](min: Either[A, A], completeBuilder: (Either[A, A], Either[A, A]) => B, converter: Either[A, A] => JsonNumericTemplate[A])(implicit evidence$2: Numeric[A]) extends Template

The numeric template for which the minimum value, either inclusive or exclusive, has been specified.

This template represents one for numerical values where the minimum constraint, whether it be an inclusive or exclusive one, has been specified. Now, only a maximum constraint can be specified, closing the now half-open interval. This is not mandatory to do. This will produce a "complete" template for which no more constraints can be specified.

Type parameters

A

the actual numeric 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

Attributes

Constructor

creates a new instance of this trait given the already specified minimum value, the function that returns a new template given the minimum and the maximum and the one that returns a new JsonNumericTemplate from this one

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

Members list

Value members

Concrete methods

def lt(max: A): B

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

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

Value parameters

max

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

Attributes

Returns

a "terminal" template, which has stored the minimum and the exclusive maximum information

def lte(max: A): B

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

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

Value parameters

max

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

Attributes

Returns

a "terminal" template, which has stored the minimum and the inclusive maximum information

Converts this template to its corresponding JsonTemplate.

Converts this template to its corresponding JsonTemplate.

Attributes

Definition Classes