final class TArray[A] extends AnyVal
Wraps array of TRef and adds methods for convenience. Caution: most of methods are not stack-safe.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- TArray
- AnyVal
- Any
- Hide All
- Show All
Visibility
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
apply(index: Int): STM[Nothing, A]
Extracts value from ref in array.
- val array: Array[TRef[A]]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
final
def
fold[Z](acc: Z)(op: (Z, A) ⇒ Z): STM[Nothing, Z]
Atomically folds TArray with pure function.
-
final
def
foldM[E, Z](acc: Z)(op: (Z, A) ⇒ STM[E, Z]): STM[E, Z]
Atomically folds TArray with STM function.
-
final
def
foreach[E](f: (A) ⇒ STM[E, Unit]): STM[E, Unit]
Atomically performs side-effect for each item in array
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
toString(): String
- Definition Classes
- Any
-
final
def
transform(f: (A) ⇒ A): STM[Nothing, Unit]
Atomically updates all TRefs inside this array using pure function.
-
final
def
transformM[E](f: (A) ⇒ STM[E, A]): STM[E, Unit]
Atomically updates all elements using transactional effect.
-
final
def
update(index: Int, fn: (A) ⇒ A): STM[Nothing, A]
Updates element in the array with given function.
-
final
def
updateM[E](index: Int, fn: (A) ⇒ STM[E, A]): STM[E, A]
Atomically updates element in the array with given transactional effect.