final class OptRefs[A <: AnyRef] 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.
- Alphabetic
- By Inheritance
- OptRefs
- ArrayLikeBase
- AnyVal
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- def apply(index: Int): OptRef[A]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone: OptRefs[A]
- def elemsLen: Int
The number of elements in the collection.
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.
- Definition Classes
- OptRefs → ArrayLikeBase
- Annotations
- @inline()
- def foreach[U](f: (OptRef[A]) => U): Unit
Performs the effectful function on each member of the collection.
Performs the effectful function on each member of the collection.
- Definition Classes
- OptRefs → ArrayLikeBase
- def foreachSome(f: (A) => Unit): Unit
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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.
- Definition Classes
- ArrayLikeBase
- def mapSomes[B, ArrT <: ArrBase[B]](f: (A) => B)(build: ArrBuild[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.
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 toString(): String
- Definition Classes
- Any
- val unsafeArray: Array[A]
- def unsafeSet(index: Int, value: OptRef[A]): Unit
- def unsafeSetNone(index: Int): Unit
- def unsafeSetSome(index: Int, value: A): Unit