#:

io.github.cakelier.tuples.space.JsonTuple$.#:
final case class #:(h: JsonElement, t: JsonTuple) extends JsonTuple

A non-empty JSON tuple, representing a generic tuple containing at least one element.

This implementation represents a tuple with at least one element, which is built element by element exploiting the "constructor" operator. Because the JSON tuple is a recursively defined data structure, the at-least-one defined element must be the one in its head, while its tail can be a JsonNil, if the tuple contains exactly one element, or another non-empty JSON tuple otherwise. This enables the recursion of this data structure.

Value parameters

h

the head of this non-empty JSON tuple, which is its first element

t

the tail of this non-empty JSON tuple, which contains all the remaining elements in order

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait JsonTuple
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

infix override def #:(h: JsonElement): JsonTuple

The constructor method for a JSON tuple, creating a new tuple from this tuple prepending a new head element to it. Being an operator ending with ":", this method is right associative, allowing a syntax such as

The constructor method for a JSON tuple, creating a new tuple from this tuple prepending a new head element to it. Being an operator ending with ":", this method is right associative, allowing a syntax such as

val tuple = 0 #: true #: "hello" #: JsonNil

Value parameters

h

The new element to be prepended to this tuple, for creating a new tuple

Attributes

Returns

a new tuple with the new element prepended to this tuple

Definition Classes
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product