in scala.collection.mutable
class ArrayBuffer

[scala.serializable]
`class` ArrayBuffer [A]
  `extends` java.lang.Object
  `with` scala.collection.mutable.Buffer[A]
  `with` scala.collection.mutable.ResizableArray[A]
  `with` scala.ScalaObject

  An implementation of the `Buffer` class using an array to represent the assembled sequence internally.

Author:
  Matthias Zenger
Version:
  1.0, 15/03/2004

Direct Known Subclasses:
  NodeBuffer, Script

Constructor Summary
| `def` this

Val inherited from scala.collection.mutable.ResizableArray[A]
initialSize

Var inherited from scala.collection.mutable.ResizableArray[A]
array , size

Def Summary
`override` | `def` ++: (iter: scala.Iterable[A]) : scala.collection.mutable.Buffer[A] Prepends a number of elements provided by an iterable object via its `elements` method. The identity of the buffer is returned.
`override` | `def` ++= (iter: scala.Iterable[A]) : scala.Unit Appends a number of elements provided by an iterable object via its `elements` method. The identity of the buffer is returned.
`override` | `def` ++= (src: scala.Array[A], start: scala.Int, len: scala.Int) : scala.Unit Appends a number of elements in an array
| `def` +: (elem: A) : scala.collection.mutable.Buffer[A] Prepends a single element to this buffer and return the identity of the buffer.
| `def` += (elem: A) : scala.Unit Appends a single element to this buffer and returns the identity of the buffer.
`override` | `def` apply (i: scala.Int) : A Returns the i-th element of this ArrayBuffer.
| `def` clear : scala.Unit Clears the buffer contents.
`override` | `def` clone : scala.collection.mutable.Buffer[A] Return a clone of this buffer.
`override` | `def` equals (obj: scala.Any) : scala.Boolean Checks if two buffers are structurally identical.
| `def` insertAll (n: scala.Int, iter: scala.Iterable[A]) : scala.Unit Inserts new elements at the index `n`. Opposed to method `update`, this method will not replace an element with a one. Instead, it will insert a new element at index `n`.
| `def` remove (n: scala.Int) : A Removes the element on a given index position.
`override` `protected` | `def` stringPrefix : java.lang.String Defines the prefix of the string representation.
| `def` update (n: scala.Int, newelem: A) : scala.Unit Replace element at index `n` with the new element `newelem`.

Def inherited from scala.collection.mutable.Buffer[A]
+ , ++, ++, ++:, ++=, ++=, ++=, +:, +=, -=, <<, append, appendAll, clear, clone, hashCode, insert, insertAll, prepend, prependAll, remove, stringPrefix, super$clone, trimEnd, trimStart, update

Def inherited from scala.collection.mutable.ResizableArray[A]
apply , copy, copyToArray, copyToBuffer, elements, ensureSize, length, swap

Constructor Detail

`def` this

Def Detail

`override def` ++: (iter: scala.Iterable[A]): scala.collection.mutable.Buffer[A]

  Prepends a number of elements provided by an iterable object via its `elements` method. The identity of the buffer is returned.

Parameters:
  `iter -` the iterable object.
Returns:
  the updated buffer.

`override def` ++= (iter: scala.Iterable[A]): scala.Unit

  Appends a number of elements provided by an iterable object via its `elements` method. The identity of the buffer is returned.

Parameters:
  `iter -` the iterable object.
Returns:
  the updated buffer.

`override def` ++= (src: scala.Array[A], start: scala.Int, len: scala.Int): scala.Unit

  Appends a number of elements in an array

Parameters:
  `src -` the array
Parameters:
  `start -` the first element to append
Parameters:
  `len -` the number of elements to append

`def` +: (elem: A): scala.collection.mutable.Buffer[A]

  Prepends a single element to this buffer and return the identity of the buffer.

Parameters:
  `elem -` the element to append.
Returns:
  the updated buffer.

`def` += (elem: A): scala.Unit

  Appends a single element to this buffer and returns the identity of the buffer.

Parameters:
  `elem -` the element to append.

`override def` apply (i: scala.Int): A

  Returns the i-th element of this ArrayBuffer.

Parameters:
  `i -` the specified index.
Returns:
  the i-th element.
Throws:
  `Predef.IndexOutOfBoundException -` if `i` is out of bounds.

`def` clear : scala.Unit

  Clears the buffer contents.

`override def` clone : scala.collection.mutable.Buffer[A]

  Return a clone of this buffer.

Returns:
  an `ArrayBuffer` with the same elements.

`override def` equals (obj: scala.Any): scala.Boolean

  Checks if two buffers are structurally identical.

Returns:
  true, iff both buffers contain the same sequence of elements.

`def` insertAll (n: scala.Int, iter: scala.Iterable[A]): scala.Unit

  Inserts new elements at the index `n`. Opposed to method `update`, this method will not replace an element with a one. Instead, it will insert a new element at index `n`.

Parameters:
  `n -` the index where a new element will be inserted.
Parameters:
  `iter -` the iterable object providing all elements to insert.
Throws:
  `Predef.IndexOutOfBoundsException -` if `n` is out of bounds.

`def` remove (n: scala.Int): A

  Removes the element on a given index position.

Parameters:
  `n -` the index which refers to the element to delete.
Returns:
  the updated array buffer.
Throws:
  `Predef.IndexOutOfBoundsException -` if `n` is out of bounds.

`override protected def` stringPrefix : java.lang.String

  Defines the prefix of the string representation.

`def` update (n: scala.Int, newelem: A): scala.Unit

  Replace element at index `n` with the new element `newelem`.

Parameters:
  `n -` the index of the element to replace.
Parameters:
  `newelem -` the new element.
Throws:
  `Predef.IndexOutOfBoundsException -` if `n` is out of bounds.