final class TArray[A] extends AnyVal
Wraps array of TRef and adds methods for convenience.
- Alphabetic
- By Inheritance
- TArray
- AnyVal
- Any
- Hide All
- Show All
- 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
-
def
apply(index: Int): USTM[A]
Extracts value from ref in array.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
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.
-
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.
-
def
contains(a: A): USTM[Boolean]
Determine if the array contains a specified value.
-
def
count(p: (A) ⇒ Boolean): USTM[Int]
Count the values in the array matching a predicate.
-
def
countSTM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Int]
Count the values in the array matching a transactional predicate.
-
def
exists(p: (A) ⇒ Boolean): USTM[Boolean]
Determine if the array contains a value satisfying a predicate.
-
def
existsSTM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Boolean]
Determine if the array contains a value satisfying a transactional predicate.
-
def
find(p: (A) ⇒ Boolean): USTM[Option[A]]
Find the first element in the array matching a predicate.
-
def
findLast(p: (A) ⇒ Boolean): USTM[Option[A]]
Find the last element in the array matching a predicate.
-
def
findLastSTM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Option[A]]
Find the last element in the array matching a transactional predicate.
-
def
findSTM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Option[A]]
Find the first element in the array matching a transactional predicate.
-
def
firstOption: USTM[Option[A]]
The first entry of the array, if it exists.
-
def
fold[Z](zero: Z)(op: (Z, A) ⇒ Z): USTM[Z]
Atomically folds using a pure function.
-
def
foldSTM[E, Z](zero: Z)(op: (Z, A) ⇒ STM[E, Z]): STM[E, Z]
Atomically folds using a transactional function.
-
def
forall(p: (A) ⇒ Boolean): USTM[Boolean]
Atomically evaluate the conjunction of a predicate across the members of the array.
-
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.
-
def
foreach[E](f: (A) ⇒ STM[E, Unit]): STM[E, Unit]
Atomically performs transactional effect for each item in array.
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
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.
-
def
indexOf(a: A): USTM[Int]
Get the first index of a specific value in the array or -1 if it does not occur.
-
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.
-
def
indexWhere(p: (A) ⇒ Boolean): USTM[Int]
Get the index of the first entry in the array matching a predicate.
-
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.
-
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.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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.
-
def
lastIndexOf(a: A): USTM[Int]
Get the last index of a specific value in the array or -1 if it does not occur.
-
def
lastOption: USTM[Option[A]]
The last entry in the array, if it exists.
-
def
maxOption(implicit ord: Ordering[A]): USTM[Option[A]]
Atomically compute the greatest element in the array, if it exists.
-
def
minOption(implicit ord: Ordering[A]): USTM[Option[A]]
Atomically compute the least element in the array, if it exists.
-
def
reduceOption(op: (A, A) ⇒ A): USTM[Option[A]]
Atomically reduce the array, if non-empty, by a binary operator.
-
def
reduceOptionSTM[E](op: (A, A) ⇒ STM[E, A]): STM[E, Option[A]]
Atomically reduce the non-empty array using a transactional binary operator.
-
def
size: Int
Returns the size of the array.
-
def
toChunk: USTM[Chunk[A]]
Collects all elements into a chunk.
-
def
toList: USTM[List[A]]
Collects all elements into a list.
-
def
toString(): String
- Definition Classes
- Any
-
def
transform(f: (A) ⇒ A): USTM[Unit]
Atomically updates all elements using a pure function.
-
def
transformSTM[E](f: (A) ⇒ STM[E, A]): STM[E, Unit]
Atomically updates all elements using a transactional effect.
-
def
update(index: Int, fn: (A) ⇒ A): USTM[Unit]
Updates element in the array with given function.
-
def
updateSTM[E](index: Int, fn: (A) ⇒ STM[E, A]): STM[E, Unit]
Atomically updates element in the array with given transactional effect.
Deprecated Value Members
-
def
collectFirstM[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.
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
-
def
countM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Int]
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
-
def
existsM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Boolean]
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
-
def
findLastM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Option[A]]
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
-
def
findM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Option[A]]
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
-
def
foldM[E, Z](zero: Z)(op: (Z, A) ⇒ STM[E, Z]): STM[E, Z]
Atomically folds using a transactional function.
Atomically folds using a transactional function.
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) use foldSTM
-
def
forallM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Boolean]
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
-
def
indexWhereM[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.
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
-
def
indexWhereM[E](p: (A) ⇒ STM[E, Boolean]): STM[E, Int]
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
-
def
reduceOptionM[E](op: (A, A) ⇒ STM[E, A]): STM[E, Option[A]]
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
-
def
transformM[E](f: (A) ⇒ STM[E, A]): STM[E, Unit]
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
-
def
updateM[E](index: Int, fn: (A) ⇒ STM[E, A]): STM[E, Unit]
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