JsonNumericTemplate

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

A JsonTemplate that can be matched against a numeric value.

This template represents all templates that can match a numeric value, so an integer, a long integer, a single precision floating point value and a double precision floating point value. For matching a numeric 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. 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 numeric 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 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

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

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

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

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