O object

arrayOps

extends Object with Serializable

Defines extension methods for immutable arrays

Supertypes

Object, Serializable

Members

def 

++

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

def 

apply

( arr: IArray[Byte] ) ( n: Int ) : Byte

The selection operation on an immutable array.

The selection operation on an immutable array.

def 

apply

( arr: IArray[Short] ) ( n: Int ) : Short

def 

apply

( arr: IArray[Char] ) ( n: Int ) : Char

def 

apply

( arr: IArray[Int] ) ( n: Int ) : Int

def 

apply

( arr: IArray[Long] ) ( n: Int ) : Long

def 

apply

( arr: IArray[Float] ) ( n: Int ) : Float

def 

apply

( arr: IArray[Double] ) ( n: Int ) : Double

def 

apply

[T] ( arr: IArray[T] ) ( n: Int ) : T

def 

apply

[T] ( arr: IArray[T] ) ( n: Int ) : T

def 

contains

[T] ( arr: IArray[T] ) ( elem: T ) : Boolean

Tests whether this array contains a given value as an element.

Tests whether this array contains a given value as an element.

def 

count

[T] ( arr: IArray[T] ) ( p: T => Boolean ) : Int

Counts the number of elements in this array which satisfy a predicate

Counts the number of elements in this array which satisfy a predicate

def 

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.

def 

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.

def 

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.

def 

exists

[T] ( arr: IArray[T] ) ( p: T => Boolean ) : Boolean

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

def 

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.

def 

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.

def 

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.

def 

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.

def 

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.

def 

fold

[T, U] ( arr: IArray[T] ) ( z: U ) ( op: (U, U) => U ) ( implicit  evidence$4: ClassTag[U] ) : U

Folds the elements of this array using the specified associative binary operator.

Folds the elements of this array using the specified associative binary operator.

def 

foldLeft

[T, U] ( arr: IArray[T] ) ( z: U ) ( op: (U, T) => U ) ( implicit  evidence$5: ClassTag[U] ) : U

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

def 

foldRight

[T, U] ( arr: IArray[T] ) ( z: U ) ( op: (T, U) => U ) ( implicit  evidence$6: ClassTag[U] ) : U

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

def 

forall

[T] ( arr: IArray[T] ) ( p: T => Boolean ) : Boolean

Tests whether a predicate holds for all elements of this array.

Tests whether a predicate holds for all elements of this array.

def 

foreach

[T, U] ( arr: IArray[T] ) ( f: T => U ) : Unit

Apply f to each element for its side effects.

Apply f to each element for its side effects.

def 

head

[T] ( arr: IArray[T] ) : T

Selects the first element of this array.

Selects the first element of this array.

def 

headOption

[T] ( arr: IArray[T] ) : Option[T]

Optionally selects the first element.

Optionally selects the first element.

def 

indexOf

[T] ( arr: IArray[T] ) ( elem: T from: Int ) : Int

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

def 

indexOf$default$3

[T] ( arr: IArray[T] ) : Int

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

def 

indexWhere

[T] ( arr: IArray[T] ) ( p: T => Boolean from: Int ) : Int

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

def 

indexWhere$default$3

[T] ( arr: IArray[T] ) : Int

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

def 

indices

[T] ( arr: IArray[T] ) : Range

Produces the range of all indices of this sequence.

Produces the range of all indices of this sequence.

def 

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.

def 

isEmpty

[T] ( arr: IArray[T] ) : Boolean

Tests whether the array is empty.

Tests whether the array is empty.

def 

iterator

[T] ( arr: IArray[T] ) : Iterator[T]

An iterator yielding the elemenst of this array.

An iterator yielding the elemenst of this array.

def 

last

[T] ( arr: IArray[T] ) : T

Selects the last element.

Selects the last element.

def 

lastIndexOf

[T] ( arr: IArray[T] ) ( elem: T end: Int ) : Int

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

def 

lastIndexOf$default$3

[T] ( arr: IArray[T] ) : Int

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

def 

lastIndexWhere

[T] ( arr: IArray[T] ) ( p: T => Boolean end: Int ) : Int

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

def 

lastIndexWhere$default$3

[T] ( arr: IArray[T] ) : Int

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

def 

lastOption

[T] ( arr: IArray[T] ) : Option[T]

Optionally selects the last element.

Optionally selects the last element.

def 

length

( arr: IArray[Byte] ) : Int

The number of elements in an immutable array

The number of elements in an immutable array

def 

length

( arr: IArray[Short] ) : Int

def 

length

( arr: IArray[Char] ) : Int

def 

length

( arr: IArray[Int] ) : Int

def 

length

( arr: IArray[Long] ) : Int

def 

length

( arr: IArray[Float] ) : Int

def 

length

( arr: IArray[Double] ) : Int

def 

length

( arr: IArray[Object] ) : Int

def 

length

[T] ( arr: IArray[T] ) : Int

def 

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.

def 

nonEmpty

[T] ( arr: IArray[T] ) : Boolean

Tests whether the array is not empty.

Tests whether the array is not empty.

def 

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.

def 

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.

def 

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.

def 

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.

def 

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.

def 

size

[T] ( arr: IArray[T] ) : Int

The size of this array.

The size of this array.

def 

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.

def 

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.

def 

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.

def 

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.

def 

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.

def 

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.

def 

startsWith

[T, U] ( arr: IArray[T] ) ( that: IArray[U] offset: Int ) ( implicit  evidence$12: ClassTag[U] ) : Boolean

Tests whether this array starts with the given array.

Tests whether this array starts with the given array.

def 

startsWith$default$3

[T, U] ( arr: IArray[T] ) : Int

Tests whether this array starts with the given array.

Tests whether this array starts with the given array.

def 

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.

def 

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.

def 

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.

def 

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.

def 

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.

def 

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.