Packages

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

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##: Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. def apply(index: Int): USTM[A]

    Extracts value from ref in array.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def collectFirst[B](pf: PartialFunction[A, B]): USTM[Option[B]]

    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]]

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

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

    Determine if the array contains a specified value.

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

    Count the values in the array matching a predicate.

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

    Count the values in the array matching a transactional predicate.

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

    Determine if the array contains a value satisfying a predicate.

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

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

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

    Find the first element in the array matching a predicate.

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

    Find the last element in the array matching a predicate.

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

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

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

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

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

    The first entry of the array, if it exists.

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

    Atomically folds using a pure function.

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

    Atomically folds using a transactional function.

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

    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]

    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]

    Atomically performs transactional effect for each item in array.

  23. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  24. def indexOf(a: A, from: Int): USTM[Int]

    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]

    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]

    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]

    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]

    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]

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

  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. def lastIndexOf(a: A, end: Int): USTM[Int]

    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]

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

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

    The last entry in the array, if it exists.

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

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

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

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

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

    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]]

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

  38. def size: Int

    Returns the size of the array.

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

    Collects all elements into a chunk.

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

    Collects all elements into a list.

  41. def toString(): String
    Definition Classes
    Any
  42. def transform(f: (A) => A): USTM[Unit]

    Atomically updates all elements using a pure function.

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

    Atomically updates all elements using a transactional effect.

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

    Updates element in the array with given function.

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

    Atomically updates element in the array with given transactional effect.

Inherited from AnyVal

Inherited from Any

Ungrouped