EmptyNumericTemplate

io.github.cakelier.tuples.space.dsl.numeric.NumericTemplate.EmptyNumericTemplate
trait EmptyNumericTemplate[A, B <: WithMinimumNumericTemplate[A, D], C <: WithMaximumNumericTemplate[A, D], D <: CompleteNumericTemplate[A]](withMinBuilder: Either[A, A] => B, withMaxBuilder: Either[A, A] => C, converter: () => JsonNumericTemplate[A])(implicit evidence$1: Numeric[A]) extends Template

The "empty" numeric template, capable of matching any value of the given numeric type.

This is the starting template from which creating any other numeric template by specifying more and more constraints. Being so, it is allowed to add a minimum value, either inclusive or exclusive, or a maximum value, either inclusive or exclusive, to create a new template from this.

Type parameters

A

the actual numeric type for which instantiating this type

B

the actual type of the template for which the minimum has been specified

C

the actual type of the template for which the maximum has been specified

D

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 function that returns a new template given the minimum, the one that returns a new template given 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 template which has stored the exclusive minimum 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 template which has stored the inclusive minimum information

def lt(max: A): C

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 template which has stored the exclusive maximum information

def lte(max: A): C

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 template which has stored the inclusive maximum information

Converts this template to its corresponding JsonTemplate.

Converts this template to its corresponding JsonTemplate.

Attributes

Definition Classes