ArrImut

trait ArrImut[+A] extends ArrayLike[A]

Base trait for specialised immutable Arrays. The final classes extend AnyVal using standard Java /Javascript Arrays for their underlying storage. A lot of the time this is a compile time wrapper with no boxing run cost.

trait ArrayLike[A]
trait ArrayLikeBase[A]
class Any
class Arr[A]
trait ArrArrayDbl[A]
class Booleans
class Chars
class Dbls
class Floats
class Ints
class Longs
class Strings
trait ValueNsArr[A]
trait DblNsArr[A]
trait Dbl1sArr[A]
class Angles
trait Dbl2sArr[A]
class MyDbl2s
class LatLongs
class PolygonLL
class LinePath
class PolygonM
class Pt2MArr
class Pt2s
trait Dbl3sArr[A]
class PolygonM3
class Pt3MArr
class Pt3s
trait Dbl4sArr[A]
class LineSegs
trait Dbl5sArr[A]
trait Dbl6sArr[A]
trait Dbl7sArr[A]
trait IntNsArr[A]
trait Int1sArr[A]
class Colours
trait Int2sArr[A]
class Coods
class Roords
class HCens
class HSides
class HVerts
trait Int4sArr[A]
class CoodLines
trait LongNsArr[A]
trait Long1sArr[A]

Type members

Types

override type ThisT <: ArrImut[A]

Value members

Abstract methods

def fElemStr: A => String
def typeStr: String

String specifying the type of this object.

String specifying the type of this object.

def unsafeNew(length: Int): ThisT

This method should rarely be needed to be used by end users, but returns a new uninitialised ArrT of the this ArrImut's final type.

This method should rarely be needed to be used by end users, but returns a new uninitialised ArrT of the this ArrImut's final type.

def unsafeSetElem(i: Int, value: A): Unit

Sets / mutates an element in the Arr. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Sets / mutates an element in the Arr. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Concrete methods

final def elemsStr: String

The element String allows the composition of toString for the whole collection. The syntax of the output will be reworked.

The element String allows the composition of toString for the whole collection. The syntax of the output will be reworked.

def find(f: A => Boolean): Option[A]
def modifyWhere(pred: A => Boolean, fNewValue: A => A): ThisT

Replaces all instances of the old value that fulfill predicate with the new value.

Replaces all instances of the old value that fulfill predicate with the new value.

def removeFirst(f: A => Boolean): ThisT
def replace(oldValue: A, newValue: A): ThisT

Replaces all instances of the old value with the new value.

Replaces all instances of the old value with the new value.

def replaceWhere(pred: A => Boolean, newValue: A): ThisT

Replaces all instances of the old value that fulfill predicate with the new value.

Replaces all instances of the old value that fulfill predicate with the new value.

final override def toString: String
Definition Classes
Any
def unsafeSetElemSeq(index: Int, elems: Iterable[A]): Unit
def unsafeSetElems(index: Int, elems: A*): Unit

Sets / mutates elements in the Arr. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

Sets / mutates elements in the Arr. This method should rarely be needed by end users, but is used by the initialisation and factory methods.

def unsafeSetHead(value: A): Unit

Sets / mutates the head element in the Arr. This method should rarely be needed by end users, but is used by initialisation and factory methods.

Sets / mutates the head element in the Arr. This method should rarely be needed by end users, but is used by initialisation and factory methods.

def unsafeSetLast(value: A): Unit

Sets / mutates the last element in the Arr. This method should rarely be needed by end users, but is used by initialisation and factory methods.

Sets / mutates the last element in the Arr. This method should rarely be needed by end users, but is used by initialisation and factory methods.

Inherited methods

@inline
def apply(index: Int): A
Inherited from
ArrayLike
def collect[B, BB <: ArrImut[B]](pf: PartialFunction[A, B])(implicit ev: ArrTBuilder[B, BB]): BB

Collects values of B by applying partial function to only those elements of A, for which the PartialFunction is defined.

Collects values of B by applying partial function to only those elements of A, for which the PartialFunction is defined.

Inherited from
ArrayLike
def collectList[B](pf: PartialFunction[A, B]): List[B]

Collects a List values of B by applying partial function to only those elements of A, for which the PartialFunction is defined.

Collects a List values of B by applying partial function to only those elements of A, for which the PartialFunction is defined.

Inherited from
ArrayLike
def contains[A1 >: A](elem: A1): Boolean
Inherited from
ArrayLike
@inline
def cycleGet(index: Int): A

Applies an index to this ArrayLike collection which cycles back to element 0, when it reaches the end of the collection. Accepts even negative integers as an index value without throwing an exception.

Applies an index to this ArrayLike collection which cycles back to element 0, when it reaches the end of the collection. Accepts even negative integers as an index value without throwing an exception.

Inherited from
ArrayLike
def eMap[B, ArrB <: ArrImut[B]](f: A => EMon[B])(implicit ev: ArrTBuilder[B, ArrB]): EMon[ArrB]
Inherited from
ArrayLike
def eMapList[B](f: A => EMon[B]): EMon[List[B]]
Inherited from
ArrayLike
def elemsLen: Int

The number of elements in the collection. These collections use underlying mutable Arrays and ArrayBuffers. The length of the underlying Array maybe longer by a multiple of this number.

The number of elements in the collection. These collections use underlying mutable Arrays and ArrayBuffers. The length of the underlying Array maybe longer by a multiple of this number.

Inherited from
ArrayLikeBase
@inline
def empty: Boolean
Inherited from
ArrayLike
def existsCount(f: A => Boolean): Int

Counts the number of elements that fulfil the condition A => Boolean

Counts the number of elements that fulfil the condition A => Boolean

Inherited from
ArrayLike
def fHeadElse[B](noHead: => B)(ifHead: A => B): B
Inherited from
ArrayLike
def fMax[B](defaultValue: B)(f: A => B)(implicit cmp: Ordering[B]): B

Gives the maximum value of type B, produced by applying the function from A to B on each element of this collection, or the default value if the collection is empty.

Gives the maximum value of type B, produced by applying the function from A to B on each element of this collection, or the default value if the collection is empty.

Inherited from
ArrayLike
def fMin[B](defaultValue: B)(f: A => B)(implicit cmp: Ordering[B]): B

Gives the minimum value of type B, produced by applying the function from A to B on each element of this collection, or the default value if the collection is empty.

Gives the minimum value of type B, produced by applying the function from A to B on each element of this collection, or the default value if the collection is empty.

Inherited from
ArrayLike
def filter[ArrA <: ArrImut[A]](f: A => Boolean)(implicit ev: ArrTBuilder[A, ArrA]): ArrA
Inherited from
ArrayLike
def filterNot[ArrA <: ArrImut[A]](f: A => Boolean)(implicit ev: ArrTBuilder[A, ArrA]): ArrA
Inherited from
ArrayLike
def filterToList(f: A => Boolean): List[A]
Inherited from
ArrayLike
def flatMap[ArrB <: ArrImut[_]](f: A => ArrB)(implicit ev: ArrTFlatBuilder[ArrB]): ArrB

Specialised flatMap to an immutable Arr.

Specialised flatMap to an immutable Arr.

Inherited from
ArrayLike
def foldHeadTail[B](initial: B)(fHead: (B, A) => B)(fTail: (B, A) => B): B
Inherited from
ArrayLike
def foldLeft[B](initial: B)(f: (B, A) => B): B
Inherited from
ArrayLike
def foldTailLeft[B](initial: B)(f: (B, A) => B): B
Inherited from
ArrayLike
def forAll(p: A => Boolean): Boolean
Inherited from
ArrayLike
def foreach[U](f: A => U): Unit
Inherited from
ArrayLike
def foreachInit[U](f: A => U): Unit
Inherited from
ArrayLike
def foreachReverse[U](f: A => U): Unit

Consider changing this name, as might not be appropriate to all sub classes.

Consider changing this name, as might not be appropriate to all sub classes.

Inherited from
ArrayLike
def foreachTail[U](f: A => U): Unit
Inherited from
ArrayLike
@inline
def head: A
Inherited from
ArrayLike
def headToStringElse(ifEmptyString: String): String
Inherited from
ArrayLike
def iFlatMap[ArrB <: ArrImut[_]](iInit: Int)(f: (A, Int) => ArrB)(implicit build: ArrTFlatBuilder[ArrB]): ArrB

Specialised flatMap with index to an immutable Arr.

Specialised flatMap with index to an immutable Arr.

Inherited from
ArrayLike
def iFlatMap[ArrB <: ArrImut[_]](f: (A, Int) => ArrB)(implicit build: ArrTFlatBuilder[ArrB]): ArrB

Specialised flatMap with index to an immutable Arr.

Specialised flatMap with index to an immutable Arr.

Inherited from
ArrayLike
def iForAll(p: (A, Int) => Boolean): Boolean
Inherited from
ArrayLike
def iForeach[U](startIndex: Int)(f: (A, Int) => U): Unit

foreach with index.

foreach with index.

Inherited from
ArrayLike
override def iForeach[U](f: (A, Int) => U): Unit
Definition Classes
Inherited from
ArrayLike
def iForeachReverse[U](f: (A, Int) => U): Unit
Inherited from
ArrayLike
def iMap[B, ArrB <: ArrImut[B]](f: (A, Int) => B)(implicit ev: ArrTBuilder[B, ArrB]): ArrB

Specialised map with index to an immutable ArrBase of B. This method should be overridden in sub classes.

Specialised map with index to an immutable ArrBase of B. This method should be overridden in sub classes.

Inherited from
ArrayLike
def ifEmpty[B](vEmpty: => B, vNonEmpty: => B): B
Inherited from
ArrayLike
def indexOf(elem: A): Int
Inherited from
ArrayLike
def indexWhere(f: A => Boolean): Int

Return the index of the first element where predicate is true, or -1 if predicate not true forall.

Return the index of the first element where predicate is true, or -1 if predicate not true forall.

Inherited from
ArrayLike
def iterFlatMap[B, ArrB <: ArrImut[B]](f: A => Iterable[B])(implicit ev: ArrTBuilder[B, ArrB]): ArrB

FlatMaps over a function from A to any Iterable.

FlatMaps over a function from A to any Iterable.

Inherited from
ArrayLike
@inline
def last: A
Inherited from
ArrayLike
def lenStr: String

Just a handy short cut to give the length of this collection as a string.

Just a handy short cut to give the length of this collection as a string.

Inherited from
ArrayLikeBase
def map[B, ArrB <: ArrImut[B]](f: A => B)(implicit ev: ArrTBuilder[B, ArrB]): ArrB

Specialised map to an immutable ArrBase of B.

Specialised map to an immutable ArrBase of B.

Inherited from
ArrayLike
def map2To1[B, ArrB <: ArrImut[B]](f: (A, A) => B)(implicit ev: ArrTBuilder[B, ArrB]): ArrB

map 2 elements of A to 1 element of B. Ignores the last element on a collection of odd numbered length.

map 2 elements of A to 1 element of B. Ignores the last element on a collection of odd numbered length.

Inherited from
ArrayLike
def mapCollectGoods[B, BB <: ArrImut[B]](f: A => EMon[B])(implicit ev: ArrTBuilder[B, BB]): BB

maps from A to EMon[B], collects the good values.

maps from A to EMon[B], collects the good values.

Inherited from
ArrayLike
def mapList[B <: AnyRef](f: A => B): List[B]

maps ValueProduct collection to List

maps ValueProduct collection to List

Inherited from
ArrayLike
def mapWithAcc[B, ArrB <: ArrImut[B], C](initC: C)(f: (A, C) => (B, C))(implicit ev: ArrTBuilder[B, ArrB]): ArrB
Inherited from
ArrayLike
def max[B >: A](implicit ord: Ordering[B]): A
Inherited from
ArrayLike
def min[B >: A](implicit ord: Ordering[B]): A
Inherited from
ArrayLike
def mkString(seperator: String): String

Not sure about this method.

Not sure about this method.

Inherited from
ArrayLike
@inline
def nonEmpty: Boolean
Inherited from
ArrayLike
@inline

Method for keeping the typer happy when returning this as an instance of ThisT.

Method for keeping the typer happy when returning this as an instance of ThisT.

Inherited from
ArrayLike
def sum(implicit ev: Sumable[A]): A
Inherited from
ArrayLike
def sumBy(f: A => Int): Int
Inherited from
ArrayLike
def toList: List[A]
Inherited from
ArrayLike
def toStrsCommaFold(fToStr: A => String): String
Inherited from
ArrayLike
def toStrsCommaNoSpaceFold(fToStr: A => String): String
Inherited from
ArrayLike
def toStrsCommaParenth(fToStr: A => String): String
Inherited from
ArrayLike
def toStrsFold(seperator: String, f: A => String): String
Inherited from
ArrayLike
def toStrsSemiFold(fToStr: A => String): String
Inherited from
ArrayLike
def toStrsSemiParenth(fToStr: A => String): String
Inherited from
ArrayLike
def zipMap[B, C, ArrC <: ArrImut[C]](operator: ArrayLike[B])(f: (A, B) => C)(implicit ev: ArrTBuilder[C, ArrC]): ArrC

Takes a second collection as a parameter and zips the elements of this collection and the operand collection and applies the specialised map function from type A and type B to type C.

Takes a second collection as a parameter and zips the elements of this collection and the operand collection and applies the specialised map function from type A and type B to type C.

Inherited from
ArrayLike
def zipMap2[B, C, D, ArrD <: ArrImut[D]](operator1: ArrayLike[B], operator2: ArrayLike[C])(f: (A, B, C) => D)(implicit ev: ArrTBuilder[D, ArrD]): ArrD

Takes a second collection and third collections as parameters and zips the elements of this collection and the operand collections and applies the specialised map function from type A and type B and type C to type D.

Takes a second collection and third collections as parameters and zips the elements of this collection and the operand collections and applies the specialised map function from type A and type B and type C to type D.

Inherited from
ArrayLike