arrayOps
extends Object with SerializableDefines extension methods for immutable arrays
Supertypes
Object, SerializableMembers
++
[T, U] ( arr: IArray[T] ) ( that: IArray[U] ) ( implicit evidence$1: ClassTag[U] ) : IArray[U]Returns this array concatenated with the given array.
Returns this array concatenated with the given array.
apply
( arr: IArray[Byte] ) ( n: Int ) : ByteThe selection operation on an immutable array.
The selection operation on an immutable array.
contains
[T] ( arr: IArray[T] ) ( elem: T ) : BooleanTests whether this array contains a given value as an element.
Tests whether this array contains a given value as an element.
count
[T] ( arr: IArray[T] ) ( p: T => Boolean ) : IntCounts the number of elements in this array which satisfy a predicate
Counts the number of elements in this array which satisfy a predicate
drop
[T] ( arr: IArray[T] ) ( n: Int ) : IArray[T]The rest of the array without its n
first elements.
The rest of the array without its n
first elements.
dropRight
[T] ( arr: IArray[T] ) ( n: Int ) : IArray[T]The rest of the array without its n
last elements.
The rest of the array without its n
last elements.
dropWhile
[T] ( arr: IArray[T] ) ( p: T => Boolean ) : IArray[T]Drops longest prefix of elements that satisfy a predicate.
Drops longest prefix of elements that satisfy a predicate.
exists
[T] ( arr: IArray[T] ) ( p: T => Boolean ) : BooleanTests whether a predicate holds for at least one element of this array.
Tests whether a predicate holds for at least one element of this array.
filter
[T] ( arr: IArray[T] ) ( p: T => Boolean ) : IArray[T]Selects all elements of this array which satisfy a predicate.
Selects all elements of this array which satisfy a predicate.
filterNot
[T] ( arr: IArray[T] ) ( p: T => Boolean ) : IArray[T]Selects all elements of this array which do not satisfy a predicate.
Selects all elements of this array which do not satisfy a predicate.
find
[T] ( arr: IArray[T] ) ( p: T => Boolean ) : Option[T]Finds the first element of the array satisfying a predicate, if any.
Finds the first element of the array satisfying a predicate, if any.
flatMap
[T, U] ( arr: IArray[T] ) ( f: T => IterableOnce[U] ) ( implicit evidence$2: ClassTag[U] ) : IArray[U]Builds a new array by applying a function to all elements of this array and using the elements of the resulting collections.
Builds a new array by applying a function to all elements of this array and using the elements of the resulting collections.
flatten
[T, U] ( arr: IArray[T] ) ( implicit evidence$3: ClassTag[U] , x$1: T => Iterable[U] ) : IArray[U]Flattens a two-dimensional array by concatenating all its rows into a single array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
fold
[T, U] ( arr: IArray[T] ) ( z: U ) ( op: (U, U) => U ) ( implicit evidence$4: ClassTag[U] ) : UFolds the elements of this array using the specified associative binary operator.
Folds the elements of this array using the specified associative binary operator.
foldLeft
[T, U] ( arr: IArray[T] ) ( z: U ) ( op: (U, T) => U ) ( implicit evidence$5: ClassTag[U] ) : UApplies a binary operator to a start value and all elements of this array, going left to right.
Applies a binary operator to a start value and all elements of this array, going left to right.
foldRight
[T, U] ( arr: IArray[T] ) ( z: U ) ( op: (T, U) => U ) ( implicit evidence$6: ClassTag[U] ) : UApplies a binary operator to all elements of this array and a start value, going right to left.
Applies a binary operator to all elements of this array and a start value, going right to left.
forall
[T] ( arr: IArray[T] ) ( p: T => Boolean ) : BooleanTests whether a predicate holds for all elements of this array.
Tests whether a predicate holds for all elements of this array.
foreach
[T, U] ( arr: IArray[T] ) ( f: T => U ) : UnitApply f
to each element for its side effects.
Apply f
to each element for its side effects.
head
[T] ( arr: IArray[T] ) : TSelects the first element of this array.
Selects the first element of this array.
headOption
[T] ( arr: IArray[T] ) : Option[T]Optionally selects the first element.
Optionally selects the first element.
indexOf
[T] ( arr: IArray[T] ) ( elem: T , from: Int ) : IntFinds index of first occurrence of some value in this array after or at some start index.
Finds index of first occurrence of some value in this array after or at some start index.
indexOf$default$3
[T] ( arr: IArray[T] ) : IntFinds index of first occurrence of some value in this array after or at some start index.
Finds index of first occurrence of some value in this array after or at some start index.
indexWhere
[T] ( arr: IArray[T] ) ( p: T => Boolean , from: Int ) : IntFinds index of the first element satisfying some predicate after or at some start index.
Finds index of the first element satisfying some predicate after or at some start index.
indexWhere$default$3
[T] ( arr: IArray[T] ) : IntFinds index of the first element satisfying some predicate after or at some start index.
Finds index of the first element satisfying some predicate after or at some start index.
indices
[T] ( arr: IArray[T] ) : RangeProduces the range of all indices of this sequence.
Produces the range of all indices of this sequence.
init
[T] ( arr: IArray[T] ) : IArray[T]The initial part of the array without its last element.
The initial part of the array without its last element.
isEmpty
[T] ( arr: IArray[T] ) : BooleanTests whether the array is empty.
Tests whether the array is empty.
iterator
[T] ( arr: IArray[T] ) : Iterator[T]An iterator yielding the elemenst of this array.
An iterator yielding the elemenst of this array.
lastIndexOf
[T] ( arr: IArray[T] ) ( elem: T , end: Int ) : IntFinds index of last occurrence of some value in this array before or at a given end index.
Finds index of last occurrence of some value in this array before or at a given end index.
lastIndexOf$default$3
[T] ( arr: IArray[T] ) : IntFinds index of last occurrence of some value in this array before or at a given end index.
Finds index of last occurrence of some value in this array before or at a given end index.
lastIndexWhere
[T] ( arr: IArray[T] ) ( p: T => Boolean , end: Int ) : IntFinds index of last element satisfying some predicate before or at given end index.
Finds index of last element satisfying some predicate before or at given end index.
lastIndexWhere$default$3
[T] ( arr: IArray[T] ) : IntFinds index of last element satisfying some predicate before or at given end index.
Finds index of last element satisfying some predicate before or at given end index.
lastOption
[T] ( arr: IArray[T] ) : Option[T]Optionally selects the last element.
Optionally selects the last element.
length
( arr: IArray[Byte] ) : IntThe number of elements in an immutable array
The number of elements in an immutable array
map
[T, U] ( arr: IArray[T] ) ( f: T => U ) ( implicit evidence$7: ClassTag[U] ) : IArray[U]Builds a new array by applying a function to all elements of this array.
Builds a new array by applying a function to all elements of this array.
nonEmpty
[T] ( arr: IArray[T] ) : BooleanTests whether the array is not empty.
Tests whether the array is not empty.
partition
[T] ( arr: IArray[T] ) ( p: T => Boolean ) : ( IArray[T], IArray[T] )A pair of, first, all elements that satisfy predicate p
and, second, all elements that do not.
A pair of, first, all elements that satisfy predicate p
and, second, all elements that do not.
reverse
[T] ( arr: IArray[T] ) : IArray[T]Returns a new array with the elements in reversed order.
Returns a new array with the elements in reversed order.
scan
[T, U] ( arr: IArray[T] ) ( z: U ) ( op: (U, U) => U ) ( implicit evidence$8: ClassTag[U] ) : IArray[U]Computes a prefix scan of the elements of the array.
Computes a prefix scan of the elements of the array.
scanLeft
[T, U] ( arr: IArray[T] ) ( z: U ) ( op: (U, T) => U ) ( implicit evidence$9: ClassTag[U] ) : IArray[U]Produces an array containing cumulative results of applying the binary operator going left to right.
Produces an array containing cumulative results of applying the binary operator going left to right.
scanRight
[T, U] ( arr: IArray[T] ) ( z: U ) ( op: (T, U) => U ) ( implicit evidence$10: ClassTag[U] ) : IArray[U]Produces an array containing cumulative results of applying the binary operator going right to left.
Produces an array containing cumulative results of applying the binary operator going right to left.
slice
[T] ( arr: IArray[T] ) ( from: Int , until: Int ) : IArray[T]Selects the interval of elements between the given indices.
Selects the interval of elements between the given indices.
sortBy
[T, U] ( arr: IArray[T] ) ( f: T => U ) ( implicit evidence$11: ClassTag[U] , x$2: Ordering[U] ) : IArray[T]Sorts this array according to the Ordering which results from transforming an implicitly given Ordering with a transformation function.
Sorts this array according to the Ordering which results from transforming an implicitly given Ordering with a transformation function.
sortWith
[T] ( arr: IArray[T] ) ( f: (T, T) => Boolean ) : IArray[T]Sorts this array according to a comparison function.
Sorts this array according to a comparison function.
sorted
[T] ( arr: IArray[T] ) ( implicit x$1: Ordering[T] ) : IArray[T]Sorts this array according to an Ordering.
Sorts this array according to an Ordering.
span
[T] ( arr: IArray[T] ) ( p: T => Boolean ) : ( IArray[T], IArray[T] )Splits this array into a prefix/suffix pair according to a predicate.
Splits this array into a prefix/suffix pair according to a predicate.
splitAt
[T] ( arr: IArray[T] ) ( n: Int ) : ( IArray[T], IArray[T] )Splits this array into two at a given position.
Splits this array into two at a given position.
startsWith
[T, U] ( arr: IArray[T] ) ( that: IArray[U] , offset: Int ) ( implicit evidence$12: ClassTag[U] ) : BooleanTests whether this array starts with the given array.
Tests whether this array starts with the given array.
startsWith$default$3
[T, U] ( arr: IArray[T] ) : IntTests whether this array starts with the given array.
Tests whether this array starts with the given array.
tail
[T] ( arr: IArray[T] ) : IArray[T]The rest of the array without its first element.
The rest of the array without its first element.
take
[T] ( arr: IArray[T] ) ( n: Int ) : IArray[T]An array containing the first n
elements of this array.
An array containing the first n
elements of this array.
takeRight
[T] ( arr: IArray[T] ) ( n: Int ) : IArray[T]An array containing the last n
elements of this array.
An array containing the last n
elements of this array.
takeWhile
[T] ( arr: IArray[T] ) ( p: T => Boolean ) : IArray[T]Takes longest prefix of elements that satisfy a predicate.
Takes longest prefix of elements that satisfy a predicate.
unzip
[U, V] ( arr: IArray[( U, V )] ) ( implicit evidence$13: ClassTag[U] , evidence$14: ClassTag[V] ) : ( IArray[U], IArray[V] )Converts an array of pairs into an array of first elements and an array of second elements.
Converts an array of pairs into an array of first elements and an array of second elements.
zip
[T, U] ( arr: IArray[T] ) ( that: IArray[U] ) ( implicit evidence$15: ClassTag[U] ) : IArray[( T, U )]Returns an array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is l...
Returns an array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is longer than the other, its remaining elements are ignored.