OptRefs

final class OptRefs[A <: AnyRef](val unsafeArray: Array[A]) extends AnyVal with ArrayLikeBase[OptRef[A]]

OptRefs is an array based collection of optional values, that uses nulls for implementation. The collection use should not have to interact with the null values directly.

Companion
object
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def apply(index: Int): OptRef[A]
def clone: OptRefs[A]
@inline
def elemsLen: Int
override def foreach[U](f: OptRef[A] => U): Unit
Definition Classes
def foreachSome(f: A => Unit): Unit
override def iForeach[U](f: (OptRef[A], Int) => U): Unit
Definition Classes
override def iForeach[U](startIndex: Int)(f: (OptRef[A], Int) => U): Unit
Definition Classes
def mapSomes[B, ArrT <: ArrImut[B]](f: A => B)(build: ArrTBuilder[B, ArrT]): ArrT
def setOtherOptRefs[B <: AnyRef](operand: OptRefs[B])(f: A => B): Unit
def setSome(index: Int, value: A): OptRefs[A]

This produces a completely new immutable collection with the element in the new collection set to the given value. The Old collection remains unchanged. If you are initialising the collection in an encapsulated space before sharing a references to the collection the unsafeSetSome method is preferred.

This produces a completely new immutable collection with the element in the new collection set to the given value. The Old collection remains unchanged. If you are initialising the collection in an encapsulated space before sharing a references to the collection the unsafeSetSome method is preferred.

def unsafeSet(index: Int, value: OptRef[A]): Unit
def unsafeSetNone(index: Int): Unit
def unsafeSetSome(index: Int, value: A): Unit

Inherited methods

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

Concrete fields

val unsafeArray: Array[A]