org.rogach.scallop

ScallopOption

abstract class ScallopOption[A] extends AnyRef

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
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. ScallopOption
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ScallopOption(nm: String)

    nm

    Name for the option

Type Members

  1. class WithFilter extends AnyRef

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def apply(): A

    Retreive the underlying value.

    Retreive the underlying value. Use only if you are completely sure that there is a value.

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. def collect[B](pf: PartialFunction[A, B]): ScallopOption[B]

    Returns ScallopOption, that contains the result of applying pf to the value, if this option is non-empty and pf is defined for that value.

    Returns ScallopOption, that contains the result of applying pf to the value, if this option is non-empty and pf is defined for that value. Returns empty ScallopOption otherwise.

    pf

    the partial function

  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  12. 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

  13. 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

  14. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  15. 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.

  16. lazy val fn: (String) ⇒ Option[A]

  17. def foreach(f: (A) ⇒ Unit): Unit

    Apply the given procedure f to the option's value, if it is nonempty.

  18. def get: Option[A]

    Retreive the underlying value as an option

  19. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  21. 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.

  22. 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.

  23. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  24. def isSupplied: Boolean

    Tests whether the underlying value was explicitly supplied by user.

  25. def map[B](f: (A) ⇒ B): ScallopOption[B]

    Returns ScallopOption, that contains the result of applying f to this option's value, if this option is non-empty.

    Returns ScallopOption, that contains the result of applying f to this option's value, if this option is non-empty. Returns ScallopOption with no value otherwise.

    f

    the function to apply

  26. def name: String

    Name for the option

  27. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  30. 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

  31. lazy val supplied: Boolean

  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  33. def toString(): String

    Definition Classes
    ScallopOption → AnyRef → Any
  34. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  35. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  36. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  37. def withFilter(p: (A) ⇒ Boolean): WithFilter

Inherited from AnyRef

Inherited from Any