in scala/collection/mutable
trait BufferProxy

trait BufferProxy[A]()
extends Buffer[A]
with ScalaObject
with Proxy

This is a simple proxy class for scala.collection.mutable.Buffer. It is most useful for assembling customized set abstractions dynamically using object composition and forwarding.
Author:
Matthias Zenger
Version:
1.0, 16/04/2004

Method Summary
  def +(elem: A): Buffer[A]
     Append a single element to this buffer and return the identity of the buffer.
override def ++(iter: Iterable[A]): Buffer[A]
     Appends a number of elements provided by an iterable object via its elements method.
  def ++(iter: Iterator[A]): Buffer[A]
     Appends a number of elements provided by an iterable object via its elements method.
override def ++:(iter: Iterable[A]): Buffer[A]
     Prepends a number of elements provided by an iterable object via its elements method.
override def ++=(iter: Iterable[A]): Unit
     Appends a number of elements provided by an iterable object via its elements method.
  def ++=(it: Iterator[A]): Unit
     Appends a number of elements provided by an iterable object via its elements method.
  def +:(elem: A): Buffer[A]
     Prepend a single element to this buffer and return the identity of the buffer.
override def +=(elem: A): Unit
     Append a single element to this buffer.
override def <<(cmd: Message[Tuple2[Location,A]]): Unit
     Send a message to this scriptable object.
override def append(elems: A*): Unit
     Appends a sequence of elements to this buffer.
override def appendAll(iter: Iterable[A]): Unit
     Appends a number of elements provided by an iterable object via its elements method.
  def apply(n: Int): A
  def clear: Unit
     Clears the buffer contents.
override def clone(): Buffer[A]
     Return a clone of this buffer.
  def elements: Iterator[A]
     Creates a new iterator over all elements contained in this object.
override def insert(n: Int, elems: A*): Unit
     Inserts new elements at the index n.
  def insertAll(n: Int, iter: Iterable[A]): Unit
     Inserts new elements at the index n.
  def length: Int
     Returns the length of the sequence.
override def prepend(elems: A*): Unit
     Prepend an element to this list.
override def prependAll(elems: Iterable[A]): Unit
     Prepends a number of elements provided by an iterable object via its elements method.
  def remove(n: Int): A
     Removes the element on a given index position.
abstract def self: Buffer[A]
  def update(n: Int, newelem: A): Unit
     Replace element at index n with the new element newelem.

Methods inherited from java/lang/Object-class
eq, finalize, getClass, ne, notify, notifyAll, synchronized, wait, wait, wait

Methods inherited from scala/Any-class
!=, ==, asInstanceOf, isInstanceOf, match

Methods inherited from scala/Iterable-class
/:, :\, concat, exists, find, foldLeft, foldRight, forall, foreach, sameElements

Methods inherited from scala/Proxy-class
equals, hashCode, toString

Methods inherited from scala/ScalaObject-class
getScalaType

Methods inherited from scala/Seq-class
concat, copyToArray, drop, indexOf, isDefinedAt, lastIndexOf, subseq, take, toList

Methods inherited from scala/collection/mutable/Buffer-class
++, ++=, stringPrefix, trimEnd, trimStart

Method Detail

self

  abstract def self: Buffer[A]

length

  def length: Int
Returns the length of the sequence.
Returns:
the sequence length.

elements

  def elements: Iterator[A]
Creates a new iterator over all elements contained in this object.
Returns:
the new iterator

apply

  def apply(n: Int): A

+

  def +(elem: A): Buffer[A]
Append a single element to this buffer and return the identity of the buffer.
Parameters:
elem - the element to append.

+=

  override def +=(elem: A): Unit
Append a single element to this buffer.
Parameters:
elem - the element to append.

++

  override def ++(iter: Iterable[A]): Buffer[A]
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.

++

  def ++(iter: Iterator[A]): Buffer[A]
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.

++=

  override def ++=(iter: Iterable[A]): Unit
Appends a number of elements provided by an iterable object via its elements method.
Parameters:
iter - the iterable object.

++=

  def ++=(it: Iterator[A]): Unit
Appends a number of elements provided by an iterable object via its elements method.
Parameters:
iter - the iterable object.

append

  override def append(elems: A*): Unit
Appends a sequence of elements to this buffer.
Parameters:
elems - the elements to append.

appendAll

  override def appendAll(iter: Iterable[A]): Unit
Appends a number of elements provided by an iterable object via its elements method.
Parameters:
iter - the iterable object.

+:

  def +:(elem: A): Buffer[A]
Prepend a single element to this buffer and return the identity of the buffer.
Parameters:
elem - the element to append.

++:

  override def ++:(iter: Iterable[A]): 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.

prepend

  override def prepend(elems: A*): Unit
Prepend an element to this list.
Parameters:
elem - the element to prepend.

prependAll

  override def prependAll(elems: Iterable[A]): Unit
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.

insert

  override def insert(n: Int, elems: A*): 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 the new elements at index n.
Parameters:
n - the index where a new element will be inserted.
elems - the new elements to insert.

insertAll

  def insertAll(n: Int, iter: Iterable[A]): 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.
iter - the iterable object providing all elements to insert.

update

  def update(n: Int, newelem: A): Unit
Replace element at index n with the new element newelem.
Parameters:
n - the index of the element to replace.
newelem - the new element.

remove

  def remove(n: Int): A
Removes the element on a given index position.
Parameters:
n - the index which refers to the element to delete.

clear

  def clear: Unit
Clears the buffer contents.

<<

  override def <<(cmd: Message[Tuple2[Location,A]]): Unit
Send a message to this scriptable object.
Parameters:
cmd - the message to send.

clone

  override def clone(): Buffer[A]
Return a clone of this buffer.
Returns:
a Buffer with the same elements.