TypeBounds

zio.blocks.typeid.TypeBounds
See theTypeBounds companion object
final case class TypeBounds(lower: Option[TypeRepr] = ..., upper: Option[TypeRepr] = ...)

Represents the bounds of a type parameter or abstract type member.

In Scala, type bounds are expressed as:

  • A : Lower (lower bound only)
  • `A >: Lower :), None means Nothing

Value parameters

upper

The upper bound (<:), None means Any

Attributes

Companion
object
Source
TypeBounds.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def aliasType: Option[TypeRepr]

Returns the alias type if this represents a type alias.

Returns the alias type if this represents a type alias.

Attributes

Source
TypeBounds.scala
def hasBothBounds: Boolean

Returns true if both bounds are specified.

Returns true if both bounds are specified.

Attributes

Source
TypeBounds.scala
def hasOnlyLower: Boolean

Returns true if only a lower bound is specified.

Returns true if only a lower bound is specified.

Attributes

Source
TypeBounds.scala
def hasOnlyUpper: Boolean

Returns true if only an upper bound is specified.

Returns true if only an upper bound is specified.

Attributes

Source
TypeBounds.scala
def isAlias: Boolean

Returns true if this represents a type alias (lower == upper).

Returns true if this represents a type alias (lower == upper).

Attributes

Source
TypeBounds.scala
def isUnbounded: Boolean

Returns true if no bounds are specified (unbounded).

Returns true if no bounds are specified (unbounded).

Attributes

Source
TypeBounds.scala

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala