Packages

trait Buffer[T] extends (Int) ⇒ T

Mutable indexed buffer abstraction.

Linear Supertypes
(Int) ⇒ T, AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. Buffer
  2. Function1
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def apply(index: Int): T

    Returns value at the provided index.

    Returns value at the provided index.

    Definition Classes
    Buffer → Function1
  2. abstract def ensureIndex(index: Int): Unit

    Ensures buffer capacity to address provided index.

    Ensures buffer capacity to address provided index.

    Attributes
    protected
  3. abstract def insertArray(index: Int, sourceIndex: Int, insertLength: Int, sourceArray: Array[T]): Buffer.this.type

    Shift current content to the right starting from indexat the insertLength distance, and copies array chunk into the gap.

    Shift current content to the right starting from indexat the insertLength distance, and copies array chunk into the gap. Sets topIndex to be at least at the end of the new chunk of values.

  4. abstract def replaceFromArray(index: Int, sourceIndex: Int, replaceLength: Int, sourceArray: Array[T]): Buffer.this.type

    Replaces current values in the range [index, index + replaceLength) with values of the array range [sourceIndex, sourceIndex + replaceLength).

  5. abstract def shiftLeft(index: Int, distance: Int): Buffer.this.type

    Moves values [index, length) left to [index-distance, length - distance).

    Moves values [index, length) left to [index-distance, length - distance). Effectively removes range (index-distance, index]. Ignores negative distance. Moves topIndex if affected.

  6. abstract def shiftRight(index: Int, distance: Int): Buffer.this.type

    Moves values [index, length) right to [index+distance, length + distance).

    Moves values [index, length) right to [index+distance, length + distance). Effectively creates a new range [index, index+distance). Ignores negative distance. Does not clear existing values inside [index, index+distance). Moves topIndex if affected.

  7. abstract def toArray: Array[T]

    Returns an Array representing accessible buffer range.

  8. abstract def toSlice: Slice[T]

    Returns a Slice representing accessible buffer range.

  9. abstract def update(index: Int, value: T): Buffer.this.type

    Updates value at the provided index.

    Updates value at the provided index.

    Exceptions thrown

    IndexOutOfBoundsException if index lower than zero.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def andThen[A](g: (T) ⇒ A): (Int) ⇒ A
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  5. final def append(value: T): Buffer.this.type

    Appends value at the end of buffer and advances topIndex.

    Appends value at the end of buffer and advances topIndex.

    Annotations
    @inline()
  6. final def appendArray(values: Array[T]): Buffer.this.type

    Appends values from the given array at the end of buffer and advances topIndex.

    Appends values from the given array at the end of buffer and advances topIndex.

    Annotations
    @inline()
  7. final def appendFromIterator(iterator: Iterator[T]): Buffer.this.type

    Appends values from the given iterator at the end of buffer and advances topIndex.

  8. final def appendIterable(iterable: Iterable[T]): Buffer.this.type

    Appends values from the given iterable at the end of buffer and advances topIndex.

    Appends values from the given iterable at the end of buffer and advances topIndex.

    Annotations
    @inline()
  9. final def appendSequence(values: IndexedSeq[T]): Buffer.this.type

    Appends values from the given sequence at the end of buffer and advances topIndex.

    Appends values from the given sequence at the end of buffer and advances topIndex.

    Annotations
    @inline()
  10. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  12. def compose[A](g: (A) ⇒ Int): (A) ⇒ T
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  13. final def drop(n: Int): Slice[T]

    Drops first N items and returns a Slice.

  14. final def dropRight(n: Int): Slice[T]

    Drops last N items and returns a Slice.

  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def forward(distance: Int): Buffer.this.type

    Moves topIndex value right by the distance.

  19. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. final def head: T

    Returns value at the topIndex.

  22. final def insertFromIterator(index: Int, insertLength: Int, iterator: Iterator[T]): Buffer.this.type

    Shift current content to the right starting from indexat the insertLength distance, and copies iterated values into the gap.

    Shift current content to the right starting from indexat the insertLength distance, and copies iterated values into the gap. Sets topIndex to be at least at the end of the new chunk of values.

  23. final def insertValues(index: Int, sourceIndex: Int, insertLength: Int, source: (Int) ⇒ T): Buffer.this.type

    Shift current content to the right starting from indexat the insertLength distance, iterates over the source indexes and copies values into the gap.

    Shift current content to the right starting from indexat the insertLength distance, iterates over the source indexes and copies values into the gap. Sets topIndex to be at least at the end of the new chunk of values.

  24. final def isEmpty: Boolean

    Is the accessible part of the buffer empty?

    Is the accessible part of the buffer empty?

    Annotations
    @inline()
  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. final def length: Int

    Length of the accessible part of the buffer.

  27. final def map(f: (T) ⇒ T): Buffer.this.type

    Updates all values in the range [0,length) using the function.

    Updates all values in the range [0,length) using the function.

    f

    map function

    Annotations
    @inline()
    Exceptions thrown

    IndexOutOfBoundsException if index lower than zero.

  28. final def modify(index: Int, map: (T) ⇒ T): Buffer.this.type

    Updates value at the provided index using the function.

    Updates value at the provided index using the function. Index must fall within range [0,length).

    index

    value's index

    map

    map function

    Exceptions thrown

    IndexOutOfBoundsException if index lower than zero.

  29. final def modifyAll(map: (T) ⇒ T): Buffer.this.type

    Updates all values in the range [0,length) using the function.

    Updates all values in the range [0,length) using the function.

    map

    map function

    Exceptions thrown

    IndexOutOfBoundsException if index lower than zero.

  30. final def modifyAllWhen(map: (T) ⇒ T, pred: (T) ⇒ Boolean): Buffer.this.type

    Updates all accepted values in the range [0,length) using the function.

    Updates all accepted values in the range [0,length) using the function.

    map

    map function

    pred

    filter function

    Exceptions thrown

    IndexOutOfBoundsException if index lower than zero.

  31. final def modifyRange(fromIndex: Int, toIndex: Int, map: (T) ⇒ T): Buffer.this.type

    Updates values in the range [startIndex,toIndex)^^[0,length) using the function. One of {startIndex,toIndex} must fall within range [0,length).

    Updates values in the range [startIndex,toIndex)^^[0,length) using the function. One of {startIndex,toIndex} must fall within range [0,length).

    fromIndex

    index of the first value inclusive

    toIndex

    index of the last value exclusive

    map

    map function

    Exceptions thrown

    IndexOutOfBoundsException if index lower than zero.

  32. final def modifyRangeWhen(fromIndex: Int, toIndex: Int, map: (T) ⇒ T, pred: (T) ⇒ Boolean): Buffer.this.type

    Updates values in the range [startIndex,toIndex)^^[0,length) using the function. One of {startIndex,toIndex} must fall within range [0,length).

    Updates values in the range [startIndex,toIndex)^^[0,length) using the function. One of {startIndex,toIndex} must fall within range [0,length).

    fromIndex

    index of the first value inclusive

    toIndex

    index of the last value exclusive

    map

    map function

    pred

    filter function

    Exceptions thrown

    IndexOutOfBoundsException if index lower than zero.

  33. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  34. final def nonEmpty: Boolean

    Is the accessible part of the buffer non empty?

    Is the accessible part of the buffer non empty?

    Annotations
    @inline()
  35. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  36. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  37. final def peek: T

    Returns value at the topIndex.

  38. final def pop: T

    Returns value at the topIndex, and moves topIndex back.

  39. final def push(value: T): Buffer.this.type

    Appends value to the topIndex.

    Appends value to the topIndex. Same as append

    Annotations
    @inline()
  40. final def remove(index: Int): Buffer.this.type

    Removes value at index and shifts content in [index+1, length) to the left.

    Removes value at index and shifts content in [index+1, length) to the left.

    Annotations
    @inline()
  41. final def removeRange(fromIndex: Int, toIndex: Int): Buffer.this.type

    Removes values in the range [fromIndex, toIndex) and shifts content in [toIndex, length) to the left.

    Removes values in the range [fromIndex, toIndex) and shifts content in [toIndex, length) to the left.

    Annotations
    @inline()
  42. final def replaceFromIterator(index: Int, replaceLength: Int, iterator: Iterator[T]): Buffer.this.type

    Replaces current values in the range [index, index + replaceLength) with values returned from the iterator.

  43. final def replaceValues(index: Int, sourceIndex: Int, replaceLength: Int, source: (Int) ⇒ T): Buffer.this.type

    Replaces current values in the range [index, index + replaceLength) with values returned by the function when iterating argument in the range [sourceIndex, sourceIndex + replaceLength).

  44. final def reset: Int

    Resets buffer, sets topIndex to -1.

    Resets buffer, sets topIndex to -1. Does not clear existing values.

    returns

    previous topIndex

  45. final def rewind(distance: Int): Buffer.this.type

    Moves topIndex value left by the distance.

  46. final def set(index: Int): Buffer.this.type

    Sets topIndex value.

  47. final def slice(from: Int, to: Int): Slice[T]

    Takes range and returns a Slice.

  48. final def store(value: T): Buffer.this.type

    Replace value at the topIndex.

  49. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  50. final def take(n: Int): Slice[T]

    Takes first N items and returns a Slice.

  51. final def takeRight(n: Int): Slice[T]

    Takes last N items and returns a Slice.

  52. def toString(): String
    Definition Classes
    Function1 → AnyRef → Any
  53. final def top: Int

    Returns topIndex value.

  54. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from (Int) ⇒ T

Inherited from AnyRef

Inherited from Any

Abstract

Stack Ops

Properties

Update

Append

Insert

Replace

Remove

Shift

Limit

Slice

Ungrouped