WithMaximumNumericTemplate

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

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

This template represents one for numerical values where the maximum constraint, whether it be an inclusive or exclusive one, has been specified. Now, only a minimum 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 maximum 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 gt(min: A): B

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

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

Value parameters

min

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

Attributes

Returns

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

def gte(min: A): B

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

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

Value parameters

min

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

Attributes

Returns

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

Converts this template to its corresponding JsonTemplate.

Converts this template to its corresponding JsonTemplate.

Attributes

Definition Classes