package Opt
Ordering
- Alphabetic
Inherited
- Opt
- scala.AnyRef
- scala.Any
- Hide All
- Show All
Visibility
- Public
- All
Type Constructor
-
def
fromOption[T](v: Option[T]): Opt[T]
By Scala Option
-
def
fromOptional[T](v: Optional[T]): Opt[T]
By Java Optional
-
def
make[T](value: T): Opt[T]
By value
-
def
makeNullAble[T](v: T): Opt[T]
By value
By value
Creates Opt based on given
value
'null' will create Opt with value 'null'
'null' options should NEVER happen, unless there is no choice
In Scalqa 'null' options only happen in cases of Arrays with default values:
new Array[String](6).all.lp // Prints: ~(null, null, null, null, null, null)
- Definition Classes
- Opt
Constant
-
val
Void: Opt[Nothing]
Void constant
Void constant
Opt void instance, which can be assigned to any Opt type
val io : Opt[Int] = Opt.Void val io2 : Opt[Int] = \/ // Same with shortcut val so : Opt[String] = Opt.Void val so2 : Opt[String] = \/ // Same with shortcut
- Definition Classes
- Opt
-
val
VoidAlt: Opt[Nothing]
Void alternative constant
Void alternative constant
VoidAlt is functionally equivalent to Void, but is not equal to Void
It is for special cases, when there is need to distinguish between different voids
// Opt access, which needs to be initialized private var _opt : Opt[Int] = Opt.VoidAlt def getOpt: Opt[Int] = if(_opt != Opt.VoidAlt) _opt else App.Fail("Not initialized") def initOpt(o :Opt[Int]): Unit = if(_opt == Opt.VoidAlt) _opt = o else App.Fail("Already initialized")
- Definition Classes
- Opt
Implicit Constructor
Implicit
-
implicit
def
zzBoolean[A](o: Opt[A]): Boolean
- Definition Classes
- _Class
-
implicit
def
zzFilterMonadic[A](o: Opt[A]): FilterMonadic[A]
- Definition Classes
- _Class
-
implicit
def
zzLibrary[A](o: Opt[A]): Opt._libraryExtension[A]
- Definition Classes
- _Class
-
implicit
def
zzStream[A](o: Opt[A]): ~[A]
- Definition Classes
- _Class
Linear Supertypes
Source: package.scala
Opt can also be created with shortcuts: