org.coroutines.Coroutine

Instance

class Instance[Y, R] extends AnyRef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Instance
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Instance()

Value Members

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

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. var $costack: Array[Coroutine[Y, R]]

  4. var $costackptr: Int

  5. var $exception: Throwable

  6. var $hasYield: Boolean

  7. var $pcstack: Array[Short]

  8. var $pcstackptr: Int

  9. var $refstack: Array[AnyRef]

  10. var $refstackptr: Int

  11. var $result: R

  12. var $target: Instance[Y, _]

  13. var $valstack: Array[Int]

  14. var $valstackptr: Int

  15. var $yield: Y

  16. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  17. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  18. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def debugString: String

    Returns a string that describes the internal state of the coroutine.

    Returns a string that describes the internal state of the coroutine.

    Contains more information than toString.

    returns

    A string containing information about the internal state of the coroutine.

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

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

    Definition Classes
    AnyRef → Any
  22. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  24. final def getException: Option[Throwable]

    Returns an Option object wrapping the exception thrown by this coroutine.

    Returns an Option object wrapping the exception thrown by this coroutine.

    returns

    If hasException, a Some instance wrapping the exception thrown by this coroutine. Otherwise, None.

  25. final def getResult: Option[R]

    Returns an Option wrapping this coroutine's non-exception result, if any.

    Returns an Option wrapping this coroutine's non-exception result, if any.

    returns

    Some(result) if hasResult, None otherwise.

  26. final def getValue: Option[Y]

    Returns an Option instance wrapping the current value of the coroutine, if any.

    Returns an Option instance wrapping the current value of the coroutine, if any.

    returns

    Some(value) if hasValue, None otherwise.

  27. final def hasException: Boolean

    Returns whether or not the coroutine completed with an exception.

    Returns whether or not the coroutine completed with an exception.

    returns

    true iff isCompleted and the coroutine has a non-null exception, false otherwise.

  28. final def hasResult: Boolean

    Returns whether or not the coroutine completed without an exception.

    Returns whether or not the coroutine completed without an exception.

    returns

    true if the coroutine completed without an exception, false otherwise.

  29. final def hasValue: Boolean

    Returns whether or not the coroutine yielded a value.

    Returns whether or not the coroutine yielded a value.

    This value can be accessed via getValue.

    returns

    true if the coroutine yielded a value, false otherwise.

  30. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  31. final def isCompleted: Boolean

    Returns true iff the coroutine instance completed execution.

    Returns true iff the coroutine instance completed execution.

    See the documentation for isLive.

    returns

    !isLive.

  32. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  33. final def isLive: Boolean

    Returns false iff the coroutine instance completed execution.

    Returns false iff the coroutine instance completed execution.

    This is true if there are either more yield statements or if the coroutine has not yet returned its result.

    returns

    true if resume can be called without an exception being thrown, false otherwise.

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

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

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

    Definition Classes
    AnyRef
  37. final def pull: Boolean

    Calls resume until either the coroutine yields a value or returns.

    Calls resume until either the coroutine yields a value or returns.

    If pull returns true, then the coroutine has suspended by yielding a value and there are more elements to traverse.

    Usage:

    while (c.pull) c.value
    returns

    false if the coroutine stopped, true otherwise.

    Annotations
    @tailrec()
    Exceptions thrown
    CoroutineStoppedException

    If the coroutine is not live.

  38. final def result: R

    The value returned by the coroutine, if the coroutine is completed.

    The value returned by the coroutine, if the coroutine is completed.

    This method will throw an exception if the result cannot be accessed.

    Note: the returned value is not the same as the value yielded by the coroutine. The coroutine may yield any number of values during its lifetime, but it returns only a single value after it terminates.

    returns

    The return value of the coroutine, if the coroutine is completed.

    Exceptions thrown
    Exception

    If hasException.

    RuntimeException

    If !isCompleted.

  39. final def resume: Boolean

    Advances the coroutine to the next yield point.

    Advances the coroutine to the next yield point.

    returns

    true if resume can be called again, false otherwise.

    Exceptions thrown
    CoroutineStoppedException

    If the coroutine is not live.

  40. final def snapshot: Instance[Y, R]

    Clones the coroutine that this instance is a part of.

    Clones the coroutine that this instance is a part of.

    returns

    A new coroutine instance with exactly the same execution state.

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

    Definition Classes
    AnyRef
  42. def toString(): String

    Returns a string representation of the coroutine's state.

    Returns a string representation of the coroutine's state.

    Contains less information than debugString.

    returns

    A string describing the coroutine state.

    Definition Classes
    Instance → AnyRef → Any
  43. final def tryResult: Try[R]

    Returns a Try object wrapping either the successful result of this coroutine or the exception that the coroutine threw.

    Returns a Try object wrapping either the successful result of this coroutine or the exception that the coroutine threw.

    returns

    A Failure instance if the coroutine has an exception, Try(result) otherwise.

  44. final def tryValue: Try[Y]

    Returns a Try instance wrapping this coroutine's value, if any.

    Returns a Try instance wrapping this coroutine's value, if any.

    The Try wraps either the current value of this coroutine or any exceptions thrown when trying to get the value.

    returns

    Success(value) if value does not throw an exception, or a Failure instance if it does.

  45. final def value: Y

    Returns the value yielded by the coroutine.

    Returns the value yielded by the coroutine.

    This method will thrown an exception if the value cannot be accessed.

    returns

    The value yielded by the coroutine, if there is one.

    Exceptions thrown
    RuntimeException

    If the coroutine doesn't have a value or if it is not live.

  46. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped