JsonIntegralTemplate

io.github.cakelier.tuples.space.JsonTemplate$.JsonNumericTemplate$.JsonIntegralTemplate
See theJsonIntegralTemplate companion object
sealed trait JsonIntegralTemplate[+A] extends JsonNumericTemplate[A]

A JsonTemplate that can be matched against an integral value.

This template represents all templates that can match an integral value, so an integer or a long integer. For matching an integral JsonElement, it can be specified a constant value, an inclusive range for the JsonElement or an inclusive one, both of which can be half-open. Also, it can be specified a value for which the JsonElement should be multiple of. If multiple constraint are specified, all of them must be true in order to match with this template, independently of the satisfiability of said constraints. If no constraint is specified, only the type equality will be checked.

Type parameters

A

the type of the integral JsonElement that this JsonTemplate can match

Attributes

Companion
object
Graph
Supertypes
trait JsonTemplate
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Concrete methods

override def matches(value: JsonElement): Boolean

Returns whether or not the given JsonElement matches this template.

Returns whether or not the given JsonElement matches this template.

Value parameters

value

the JsonElement to match

Attributes

Returns

whether or not the given JsonElement matches

Definition Classes

Abstract fields

val multipleOf: Option[A]

The value for which the given JsonElement should be a multiple of.

The value for which the given JsonElement should be a multiple of.

Attributes

Inherited fields

val const: Option[A]

The constant numeric value to be used for matching against the given JsonElement.

The constant numeric value to be used for matching against the given JsonElement.

Attributes

Inherited from:
JsonNumericTemplate

The exclusive maximum to be used for matching against the given JsonElement.

The exclusive maximum to be used for matching against the given JsonElement.

Attributes

Inherited from:
JsonNumericTemplate

The exclusive minimum to be used for matching against the given JsonElement.

The exclusive minimum to be used for matching against the given JsonElement.

Attributes

Inherited from:
JsonNumericTemplate
val maximum: Option[A]

The inclusive maximum to be used for matching against the given JsonElement.

The inclusive maximum to be used for matching against the given JsonElement.

Attributes

Inherited from:
JsonNumericTemplate
val minimum: Option[A]

The inclusive minimum to be used for matching against the given JsonElement.

The inclusive minimum to be used for matching against the given JsonElement.

Attributes

Inherited from:
JsonNumericTemplate