ArrayExtensions

ostrat.ArrayExtensions
final class ArrayExtensions[A](val thisArray: Array[A]) extends AnyVal

Extension methods for Array[A] class

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def headOnly[B](ifEmpty: => B, fNonEmpty: A => B): B

This method and "fHead" removes the need for headOption in the majority of case. Use fHead when are interested in the tail value

This method and "fHead" removes the need for headOption in the majority of case. Use fHead when are interested in the tail value

Attributes

def iForeach(f: (A, Int) => Unit, count: Int): Unit

foreach loop with counter

foreach loop with counter

Attributes

def ifEmpty[B](vEmpty: => B, vNonEmpty: => B): B
def mapArr[B, BB <: Arr[B]](f: A => B)(implicit ev: BuilderArrMap[B, BB]): BB

maps to a Arr of B.

maps to a Arr of B.

Attributes

def removeAt(i: Int)(implicit ct: ClassTag[A]): Array[A]

Extension method. Removes element at given index and returns a new Array.

Extension method. Removes element at given index and returns a new Array.

Attributes

def toStr: String
def toStrsCommaFold(fToStr: A => String): String
def toStrsCommaParenth(fToStr: A => String): String
def toStrsFold(seperator: String, f: A => String): String
def toStrsSemiFold(fToStr: A => String): String
def toStrsSemiParenth(fToStr: A => String): String

Concrete fields

val thisArray: Array[A]