_methods

trait _methods

Array Extension Methods

Extension methods are universaly avaialble for all Array types.

Source
_methods.scala
class java.lang.Object
trait scala.Matchable
class Any

Def

inline def +(v: A)(using s: Specialized[A]): s.Array

Shortcut to 'join'

Shortcut to 'join'

Copies base array to a new array with given element appended

Source
_methods.scala
inline def ++(v: Stream[A])(using s: Specialized[A]): s.Array

Shortcut to 'joinAll'

Shortcut to 'joinAll'

Copies base array to a new array with given stream of elements appended

Source
_methods.scala
inline def ++@(i: Int, v: Stream[A])(using s: Specialized[A]): s.Array

Shortcut to 'joinAllAt'

Shortcut to 'joinAllAt'

Copies base array to a new array with given stream of elements inserted at given position

Source
_methods.scala
inline def +@(i: Int, v: A)(using s: Specialized[A]): s.Array

Shortcut to 'joinAt'

Shortcut to 'joinAt'

Copies base array to a new array with given element inserted at given position

Source
_methods.scala
inline def contains(v: A)(using s: Specialized[A]): Boolean

Contains check

Contains check

Returns true if array contains equal value, `false - otherwise

Source
_methods.scala
inline def copySize(size: Int)(using s: Specialized[A]): s.Array

Copy with new size

Copy with new size

Creates new Array of specified size (can be larger or smaller), with appropriate elements copied from base array

Source
_methods.scala
inline def copyTo(a: Array[A]): Unit

Copy to array

Copy to array

Copies base array elements to given array

Note. Efficient JVM System.arraycopy method is used

Source
_methods.scala
inline def copyTo(a: Array[A], pos: Int): Unit

Copy to array

Copy to array

Copies base array elements to given array, starting at given position

Note. Efficient JVM System.arraycopy method is used

Source
_methods.scala
inline def copyTo(a: Array[A], pos: Int, from: Int, size: Int): Unit

Copy to array

Copy to array

Copies base array elements to given array, starting at given 'pos'

'from' and 'size' specify base array range to be copied

Note. Efficient JVM System.arraycopy method is used

Source
_methods.scala
inline def dropRange(start: Int, size: Int)(using s: Specialized[A]): s.Array

Drop range

Drop range

Copies base array to a new array without elements of specified range

Source
_methods.scala
inline def dropRange(r: Int.Range)(using s: Specialized[A]): s.Array

Drop range

Drop range

Copies base array to a new array without elements of specified range

Source
_methods.scala
inline def fill(v: A)(using s: Specialized[A]): Unit

Fill value

Fill value

Assigns given value to all base array positions

Source
_methods.scala
inline def fillRange(start: Int, size: Int, v: A)(using s: Specialized[A]): Unit

Fill range with value

Fill range with value

Assigns given value to base array positions within given range

Source
_methods.scala
inline def fillRange(r: Int.Range, v: A)(using s: Specialized[A]): Unit

Fill range with value

Fill range with value

Assigns given value to base array positions within given range

Source
_methods.scala
inline def join(v: A)(using s: Specialized[A]): s.Array

Join element

Join element

Copies base array to a new array with given element appended

Source
_methods.scala
inline def joinAll(v: Stream[A])(using s: Specialized[A]): s.Array

Join multiple elements

Join multiple elements

Copies base array to a new array with given stream of elements appended

Source
_methods.scala
inline def joinAllAt(i: Int, v: Stream[A])(using s: Specialized[A]): s.Array

Join multiple elements at position

Join multiple elements at position

Copies base array to a new array with given stream of elements inserted at given position

Source
_methods.scala
inline def joinAt(i: Int, v: A)(using s: Specialized[A]): s.Array

Join element at position

Join element at position

Copies base array to a new array with given element inserted at given position

Source
_methods.scala
inline def newArray(size: Int)(using s: Specialized[A]): s.Array

New Array

New Array

Creates new empty array of the same type as base array, but with given size

Source
_methods.scala
inline def pack(using s: Specialized[A]): s.Pack
inline def sort(using c: Ordering[A])(using s: Specialized[A]): Unit

Sort array

Sort array

Sorts array elements

Source
_methods.scala
inline def sortRange(start: Int, size: Int)(using c: Ordering[A])(using s: Specialized[A]): Unit

Sort array range

Sort array range

Sorts array elements within given range

Source
_methods.scala
inline def sortRange(r: Int.Range)(using c: Ordering[A])(using s: Specialized[A]): Unit

Sort array range

Sort array range

Sorts array elements within given range

Source
_methods.scala
inline def stream(using s: Specialized[A]): Specialized.Stream & Able.Size

Elements stream

Elements stream

Returns stream of array elements

Source
_methods.scala
inline def stream(sz: Int)(using s: Specialized[A]): Specialized.Stream & Able.Size

Sized stream

Sized stream

Returns stream of array elements limited to given size

Source
_methods.scala
inline def takeRange(start: Int, size: Int)(using s: Specialized[A]): s.Array

Take range

Take range

Copies given range of elements a new array

Source
_methods.scala
inline def takeRange(r: Int.Range)(using s: Specialized[A]): s.Array

Take range

Take range

Copies given range of elements a new array

Source
_methods.scala