abstract class ScallopOption[A] extends ScallopOptionBase
A class to hold a reference to not-yet-computed option values.
Basically, this is a lazy option - it batches up all operations, and evaluates the value only as the last resort.
- Self Type
- ScallopOption[A]
- Source
- ScallopOption.scala
- Alphabetic
- By Inheritance
- ScallopOption
- ScallopOptionBase
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Type Members
- class WithFilter extends AnyRef
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val _transformCount: Int
- def apply(): A
Retreive the underlying value.
Retreive the underlying value. Use only if you are completely sure that there is a value.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def collect[B](pf: PartialFunction[A, B]): ScallopOption[B]
Returns ScallopOption, that contains the result of applying
to the value, if this option is non-empty and pf is defined for that value.pfReturns ScallopOption, that contains the result of applying
to the value, if this option is non-empty and pf is defined for that value. Returns empty ScallopOption otherwise.pf- pf
the partial function
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def filter(p: (A) => Boolean): ScallopOption[A]
Returns ScallopOption, that contains the value if applying predicate p to this value returned true.
Returns ScallopOption, that contains the value if applying predicate p to this value returned true. No value otherwise.
- p
the predicate used for testing
- def filterNot(p: (A) => Boolean): ScallopOption[A]
Returns ScallopOption, that contains the value if applying predicate p to this value returned false.
Returns ScallopOption, that contains the value if applying predicate p to this value returned false. No value otherwise.
- p
the predicate used for testing
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def flatMap[B](f: (A) => ScallopOption[B]): ScallopOption[B]
Returns the result of applying f th this options value if this option is non-empty.
- lazy val fn: (String) => Option[A]
- def foreach(f: (A) => Unit): Unit
Apply the given procedure f to the option's value, if it is nonempty.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getOrElse(default: => A): A
Retrieve the underlying value if the option is nonempty, otherwise return the result of evaluating
default. - def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def isDefined: Boolean
A convenience method to check whether the underlying option is defined.
A convenience method to check whether the underlying option is defined. Just an alias for opt.get.isDefined.
- def isEmpty: Boolean
A convenience method to check whether the underlying option is empty.
A convenience method to check whether the underlying option is empty. Just an alias for !opt.isDefined.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isSupplied: Boolean
Tests whether the underlying value was explicitly supplied by user.
Tests whether the underlying value was explicitly supplied by user.
- Definition Classes
- ScallopOption → ScallopOptionBase
- def map[B](f: (A) => B): ScallopOption[B]
Returns ScallopOption, that contains the result of applying
to this option's value, if this option is non-empty.fReturns ScallopOption, that contains the result of applying
to this option's value, if this option is non-empty. Returns ScallopOption with no value otherwise.f- f
the function to apply
- def name: String
Name for the option
Name for the option
- Definition Classes
- ScallopOption → ScallopOptionBase
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def orElse[B >: A](alternative: => Option[B]): ScallopOption[B]
Returns ScallopOption with this value if it is non-empty, or with the value of the alternative option.
Returns ScallopOption with this value if it is non-empty, or with the value of the alternative option. If it is empty too, the resulting ScallopOption will contain None.
- alternative
the alternative expression
- lazy val supplied: (String) => Boolean
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toOption: Option[A]
Retreive the underlying value as a scala Option
- def toString(): String
- Definition Classes
- ScallopOption → AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withFilter(p: (A) => Boolean): WithFilter
Deprecated Value Members
- def get: Option[A]
Retreive the underlying value as an option
Retreive the underlying value as an option
- Annotations
- @deprecated
- Deprecated
(Since version 1.0.2) use .toOption instead