final class RefArrayBuffer[N >: Null <: AnyRef] extends AnyRef
An array based implementation of a mutable buffer. This implementation offers highly optimized, but very unsafe methods and is therefore not a general purpose data-structure. In general, this buffer should only be used to reference objects which outlive the life time of the buffer AND where the buffer is only used locally. To foster a local usage only, we do not inherit from any standard collection classes.
- Self Type
- RefArrayBuffer[N]
- Note
This data structure is not thread safe.
- Alphabetic
- By Inheritance
- RefArrayBuffer
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
++=(other: Array[N]): RefArrayBuffer.this.type
Copies all values from the given array to this buffer in one step.
- def ++=(other: RefArrayBuffer[N]): RefArrayBuffer.this.type
- def ++=(is: Iterator[N]): RefArrayBuffer.this.type
- def ++=(is: Traversable[N]): RefArrayBuffer.this.type
- def +=(i: N): RefArrayBuffer.this.type
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
_UNSAFE_resetSize(): Unit
Resets the size of the buffer, but does not clear the underlying array; hence, the array may prevent the garbage collection of the still referenced values.
Resets the size of the buffer, but does not clear the underlying array; hence, the array may prevent the garbage collection of the still referenced values. This is generally not a problem if the array is only used locally and the referenced (dead) objects outlive the lifetime of the buffer!
-
def
_UNSAFE_toArray: Array[N]
Returns a reference to the underlying mutable array if it is (by chance) completely full; otherwise a new array which just contains the valid entries is returned.
- def apply(index: Int): N
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def ensureAdditionalCapacity(capacity: Int): Unit
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def foreach[U](f: (N) ⇒ U): Unit
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def head: N
- def isEmpty: Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
iterator(from: Int = 0, until: Int = buffer.size0): RefIterator[N]
Returns an iterator which iterates over the values in the specified range.
Returns an iterator which iterates over the values in the specified range. The iterator will not check for updates of the underlying collection.
- from
index of the first element that will be returned (inclusive)
- until
index of the last element (exclusive)
- Note
The
nextmethod will throw anIndexOutOfBoundsExceptionwhen all elements are already returned.
-
def
iteratorFrom(startIndex: Int): RefIterator[N]
Returns an iterator which iterates over the values starting with the value at the given
startIndex.Returns an iterator which iterates over the values starting with the value at the given
startIndex. The iterator will not check for updates of the underlying collection.- startIndex
index of the first element that will be returned (inclusive)
- def last: N
- def length: Int
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nonEmpty: Boolean
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def size: Int
-
def
slice(from: Int, until: Int = size0): RefArray[N]
Extracts the slice of the given size.
Extracts the slice of the given size.
- from
the index of the first item (inclusive)
- until
the index of the last item (exclusive)
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def toArray[T >: N](implicit arg0: ClassTag[T]): Array[T]
- def toSet[T >: N <: AnyRef]: Set[T]
-
def
toString(): String
- Definition Classes
- RefArrayBuffer → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )