final class NOpt[+A] extends AnyVal with Serializable
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- NOpt
- Serializable
- Serializable
- AnyVal
- Any
- Hide All
- Show All
Visibility
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
boxed[B](implicit boxing: Boxing[A, B]): NOpt[B]
- Annotations
- @inline()
-
def
collect[B](pf: PartialFunction[A, B]): NOpt[B]
- Annotations
- @inline()
-
def
contains[A1 >: A](elem: A1): Boolean
- Annotations
- @inline()
-
def
exists(p: (A) ⇒ Boolean): Boolean
- Annotations
- @inline()
-
def
filter(p: (A) ⇒ Boolean): NOpt[A]
- Annotations
- @inline()
-
def
filterNot(p: (A) ⇒ Boolean): NOpt[A]
- Annotations
- @inline()
-
def
flatMap[B](f: (A) ⇒ NOpt[B]): NOpt[B]
- Annotations
- @inline()
-
def
flatten[B](implicit ev: <:<[A, NOpt[B]]): NOpt[B]
- Annotations
- @inline()
-
def
fold[B](ifEmpty: ⇒ B)(f: (A) ⇒ B): B
- Annotations
- @inline()
-
def
forEmpty(sideEffect: ⇒ Unit): NOpt[A]
Apply side effect only if NOpt is empty.
Apply side effect only if NOpt is empty. It's a bit like foreach for NOpt.Empty
- sideEffect
- code to be executed if nopt is empty
- returns
the same nopt
- Annotations
- @inline()
captionNOpt.forEmpty(logger.warn("caption is empty")).foreach(setCaption)
Example: -
def
forall(p: (A) ⇒ Boolean): Boolean
- Annotations
- @inline()
-
def
foreach[U](f: (A) ⇒ U): Unit
- Annotations
- @inline()
-
def
get: A
- Annotations
- @inline()
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
def
getOrElse[B >: A](default: ⇒ B): B
- Annotations
- @inline()
-
def
isDefined: Boolean
- Annotations
- @inline()
-
def
isEmpty: Boolean
- Annotations
- @inline()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
iterator: Iterator[A]
- Annotations
- @inline()
-
def
map[B](f: (A) ⇒ B): NOpt[B]
- Annotations
- @inline()
-
def
nonEmpty: Boolean
- Annotations
- @inline()
-
def
orElse[B >: A](alternative: ⇒ NOpt[B]): NOpt[B]
- Annotations
- @inline()
-
def
orNull[B >: A](implicit ev: <:<[Null, B]): B
- Annotations
- @inline()
-
def
toLeft[X](right: ⇒ X): Either[A, X]
- Annotations
- @inline()
-
def
toList: List[A]
- Annotations
- @inline()
-
def
toOpt: Opt[A]
Converts this
NOpt
intoOpt
.Converts this
NOpt
intoOpt
. BecauseOpt
cannot holdnull
,NOpt(null)
is translated toOpt.Empty
.- Annotations
- @inline()
-
def
toOptArg: OptArg[A]
Converts this
NOpt
intoOptArg
.Converts this
NOpt
intoOptArg
. BecauseOptArg
cannot holdnull
,NOpt(null)
is translated toOptArg.Empty
.- Annotations
- @inline()
-
def
toOptRef[B >: Null](implicit boxing: Boxing[A, B]): OptRef[B]
Converts this
NOpt
intoOptRef
, changing the element type into boxed representation if necessary (e.g.Converts this
NOpt
intoOptRef
, changing the element type into boxed representation if necessary (e.g.Boolean
intojava.lang.Boolean
). BecauseOptRef
cannot holdnull
,NOpt(null)
is translated toOptRef.Empty
.- Annotations
- @inline()
-
def
toOption: Option[A]
- Annotations
- @inline()
-
def
toRight[X](left: ⇒ X): Either[X, A]
- Annotations
- @inline()
-
def
toString(): String
- Definition Classes
- NOpt → Any
-
def
unboxed[B](implicit unboxing: Unboxing[B, A]): NOpt[B]
- Annotations
- @inline()
-
def
withFilter(p: (A) ⇒ Boolean): WithFilter[A]
- Annotations
- @inline()
-
def
zip[B](that: NOpt[B]): NOpt[(A, B)]
- Annotations
- @inline()