Class/Object

zio.stm

TArray

Related Docs: object TArray | package stm

Permalink

final class TArray[A] extends AnyVal

Wraps array of TRef and adds methods for convenience.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TArray
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

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

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

    Permalink
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    Any
  4. def apply(index: Int): USTM[A]

    Permalink

    Extracts value from ref in array.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def collectFirst[B](pf: PartialFunction[A, B]): USTM[Option[B]]

    Permalink

    Finds the result of applying a partial function to the first value in its domain.

  7. def collectFirstSTM[E, B](pf: PartialFunction[A, STM[E, B]]): STM[E, Option[B]]

    Permalink

    Finds the result of applying an transactional partial function to the first value in its domain.

  8. def contains(a: A): USTM[Boolean]

    Permalink

    Determine if the array contains a specified value.

  9. def count(p: (A) ⇒ Boolean): USTM[Int]

    Permalink

    Count the values in the array matching a predicate.

  10. def countSTM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Int]

    Permalink

    Count the values in the array matching a transactional predicate.

  11. def exists(p: (A) ⇒ Boolean): USTM[Boolean]

    Permalink

    Determine if the array contains a value satisfying a predicate.

  12. def existsSTM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Boolean]

    Permalink

    Determine if the array contains a value satisfying a transactional predicate.

  13. def find(p: (A) ⇒ Boolean): USTM[Option[A]]

    Permalink

    Find the first element in the array matching a predicate.

  14. def findLast(p: (A) ⇒ Boolean): USTM[Option[A]]

    Permalink

    Find the last element in the array matching a predicate.

  15. def findLastSTM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Option[A]]

    Permalink

    Find the last element in the array matching a transactional predicate.

  16. def findSTM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Option[A]]

    Permalink

    Find the first element in the array matching a transactional predicate.

  17. def firstOption: USTM[Option[A]]

    Permalink

    The first entry of the array, if it exists.

  18. def fold[Z](zero: Z)(op: (Z, A) ⇒ Z): USTM[Z]

    Permalink

    Atomically folds using a pure function.

  19. def foldSTM[E, Z](zero: Z)(op: (Z, A) ⇒ STM[E, Z]): STM[E, Z]

    Permalink

    Atomically folds using a transactional function.

  20. def forall(p: (A) ⇒ Boolean): USTM[Boolean]

    Permalink

    Atomically evaluate the conjunction of a predicate across the members of the array.

  21. def forallSTM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Boolean]

    Permalink

    Atomically evaluate the conjunction of a transactional predicate across the members of the array.

  22. def foreach[E](f: (A) ⇒ STM[E, Unit]): STM[E, Unit]

    Permalink

    Atomically performs transactional effect for each item in array.

  23. def getClass(): Class[_ <: AnyVal]

    Permalink
    Definition Classes
    AnyVal → Any
  24. def indexOf(a: A, from: Int): USTM[Int]

    Permalink

    Get the first index of a specific value in the array, starting at a specific index, or -1 if it does not occur.

  25. def indexOf(a: A): USTM[Int]

    Permalink

    Get the first index of a specific value in the array or -1 if it does not occur.

  26. def indexWhere(p: (A) ⇒ Boolean, from: Int): USTM[Int]

    Permalink

    Get the index of the first entry in the array, starting at a specific index, matching a predicate.

  27. def indexWhere(p: (A) ⇒ Boolean): USTM[Int]

    Permalink

    Get the index of the first entry in the array matching a predicate.

  28. def indexWhereSTM[E](p: (A) ⇒ STM[E, Boolean], from: Int): STM[E, Int]

    Permalink

    Starting at specified index, get the index of the next entry that matches a transactional predicate.

  29. def indexWhereSTM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Int]

    Permalink

    Get the index of the first entry in the array matching a transactional predicate.

  30. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  31. def lastIndexOf(a: A, end: Int): USTM[Int]

    Permalink

    Get the first index of a specific value in the array, bounded above by a specific index, or -1 if it does not occur.

  32. def lastIndexOf(a: A): USTM[Int]

    Permalink

    Get the last index of a specific value in the array or -1 if it does not occur.

  33. def lastOption: USTM[Option[A]]

    Permalink

    The last entry in the array, if it exists.

  34. def maxOption(implicit ord: Ordering[A]): USTM[Option[A]]

    Permalink

    Atomically compute the greatest element in the array, if it exists.

  35. def minOption(implicit ord: Ordering[A]): USTM[Option[A]]

    Permalink

    Atomically compute the least element in the array, if it exists.

  36. def reduceOption(op: (A, A) ⇒ A): USTM[Option[A]]

    Permalink

    Atomically reduce the array, if non-empty, by a binary operator.

  37. def reduceOptionSTM[E](op: (A, A) ⇒ STM[E, A]): STM[E, Option[A]]

    Permalink

    Atomically reduce the non-empty array using a transactional binary operator.

  38. def size: Int

    Permalink

    Returns the size of the array.

  39. def toChunk: USTM[Chunk[A]]

    Permalink

    Collects all elements into a chunk.

  40. def toList: USTM[List[A]]

    Permalink

    Collects all elements into a list.

  41. def toString(): String

    Permalink
    Definition Classes
    Any
  42. def transform(f: (A) ⇒ A): USTM[Unit]

    Permalink

    Atomically updates all elements using a pure function.

  43. def transformSTM[E](f: (A) ⇒ STM[E, A]): STM[E, Unit]

    Permalink

    Atomically updates all elements using a transactional effect.

  44. def update(index: Int, fn: (A) ⇒ A): USTM[Unit]

    Permalink

    Updates element in the array with given function.

  45. def updateSTM[E](index: Int, fn: (A) ⇒ STM[E, A]): STM[E, Unit]

    Permalink

    Atomically updates element in the array with given transactional effect.

Deprecated Value Members

  1. def collectFirstM[E, B](pf: PartialFunction[A, STM[E, B]]): STM[E, Option[B]]

    Permalink

    Finds the result of applying an transactional partial function to the first value in its domain.

    Finds the result of applying an transactional partial function to the first value in its domain.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use collectFirstSTM

  2. def countM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Int]

    Permalink

    Count the values in the array matching a transactional predicate.

    Count the values in the array matching a transactional predicate.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use countSTM

  3. def existsM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Boolean]

    Permalink

    Determine if the array contains a value satisfying a transactional predicate.

    Determine if the array contains a value satisfying a transactional predicate.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use existsSTM

  4. def findLastM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Option[A]]

    Permalink

    Find the last element in the array matching a transactional predicate.

    Find the last element in the array matching a transactional predicate.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use findLastSTM

  5. def findM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Option[A]]

    Permalink

    Find the first element in the array matching a transactional predicate.

    Find the first element in the array matching a transactional predicate.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use findSTM

  6. def foldM[E, Z](zero: Z)(op: (Z, A) ⇒ STM[E, Z]): STM[E, Z]

    Permalink

    Atomically folds using a transactional function.

    Atomically folds using a transactional function.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use foldSTM

  7. def forallM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Boolean]

    Permalink

    Atomically evaluate the conjunction of a transactional predicate across the members of the array.

    Atomically evaluate the conjunction of a transactional predicate across the members of the array.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use forallSTM

  8. def indexWhereM[E](p: (A) ⇒ STM[E, Boolean], from: Int): STM[E, Int]

    Permalink

    Starting at specified index, get the index of the next entry that matches a transactional predicate.

    Starting at specified index, get the index of the next entry that matches a transactional predicate.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use indexWhereSTM

  9. def indexWhereM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Int]

    Permalink

    Get the index of the first entry in the array matching a transactional predicate.

    Get the index of the first entry in the array matching a transactional predicate.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use indexWhereSTM

  10. def reduceOptionM[E](op: (A, A) ⇒ STM[E, A]): STM[E, Option[A]]

    Permalink

    Atomically reduce the non-empty array using a transactional binary operator.

    Atomically reduce the non-empty array using a transactional binary operator.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use reduceOptionSTM

  11. def transformM[E](f: (A) ⇒ STM[E, A]): STM[E, Unit]

    Permalink

    Atomically updates all elements using a transactional effect.

    Atomically updates all elements using a transactional effect.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use transformSTM

  12. def updateM[E](index: Int, fn: (A) ⇒ STM[E, A]): STM[E, Unit]

    Permalink

    Atomically updates element in the array with given transactional effect.

    Atomically updates element in the array with given transactional effect.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) use updateSTM

Inherited from AnyVal

Inherited from Any

Ungrouped