Request

object Request
Companion
class
Source
__.scala
class Object
trait Matchable
class Any

Member

object ALL extends Request
Source
ALL.scala
object ALL extends Request
Source
ALL.scala
object BOTTOM extends Request
object BOTTOM extends Request
object CENTER extends Request
object CENTER extends Request
object CURRENT extends Request
object CURRENT extends Request
object DEFAULT extends Request
object DEFAULT extends Request
object DOWN extends Request
object DOWN extends Request
object EMPTY extends Request
object EMPTY extends Request
object LEFT extends Request
object LEFT extends Request
object MAX extends Request
object MAX extends Request
object MIN extends Request
object MIN extends Request
object RIGHT extends Request
object RIGHT extends Request
object TOP extends Request
object TOP extends Request
object UP extends Request
object UP extends Request
object VOID extends Request with ZVoidDefaults

Scalqa supports a concept of "void object" ("empty object"), which can be defined for many types. This is similar to 'Null Object Pattern'

Unlike 'null', void object can have methods invoked, getting some behavior pertinent to 'voidness'

Examples:

  • Void Stream can be a singleton empty stream, which can be re-used for any type
  • Void String is a string of zero length, which can be re-used for String type instead of null

Types with void values have to define implicit conversions from \/

class Foo

object Foo{
 val void = new Foo with Void

 implicit inline def xxRequest(inline v: \/) = void
}

var v: Foo = \/   // Standard void assignment

/ is a shortcut to assign empty implementations for many types

var s: ~[Int]       = \/     // Assigning empty [[Stream]] of Ints
var o: Opt[String]  = \/     // Assigning empty optional value of String
var i: Long.Idx     = \/     // Assigning empty indexed collection of Long

Also see Any.Self.Void

A standard way to test for voidness is universal .isEmpty method.

Source
VOID.scala
object VOID extends Request with ZVoidDefaults

Scalqa supports a concept of "void object" ("empty object"), which can be defined for many types. This is similar to 'Null Object Pattern'

Unlike 'null', void object can have methods invoked, getting some behavior pertinent to 'voidness'

Examples:

  • Void Stream can be a singleton empty stream, which can be re-used for any type
  • Void String is a string of zero length, which can be re-used for String type instead of null

Types with void values have to define implicit conversions from \/

class Foo

object Foo{
 val void = new Foo with Void

 implicit inline def xxRequest(inline v: \/) = void
}

var v: Foo = \/   // Standard void assignment

/ is a shortcut to assign empty implementations for many types

var s: ~[Int]       = \/     // Assigning empty [[Stream]] of Ints
var o: Opt[String]  = \/     // Assigning empty optional value of String
var i: Long.Idx     = \/     // Assigning empty indexed collection of Long

Also see Any.Self.Void

A standard way to test for voidness is universal .isEmpty method.

Source
VOID.scala