in scala/collection/mutable
class ObservableBuffer

abstract class ObservableBuffer[A,This<:ObservableBuffer[A,This]]()
extends Buffer[A]
with ScalaObject
with Publisher[Message[Tuple2[Location,A]] with Undoable ,This]

This class is typically used as a mixin. It adds a subscription mechanism to the Buffer class into which this abstract class is mixed in. Class ObservableBuffer publishes events of the type Message.
Author:
Matthias Zenger
Version:
1.0, 08/07/2003

Method Summary
override def +(element: A): Buffer[A]
     Append a single element to this buffer and return the identity of the buffer.
override def +:(element: A): Buffer[A]
     Prepend a single element to this buffer and return the identity of the buffer.
override def clear: Unit
     Clears the buffer contents.
override def insertAll(n: Int, iter: Iterable[A]): Unit
     Inserts new elements at the index n.
override def remove(n: Int): A
     Removes the element on a given index position.
override def update(n: Int, newelement: A): Unit
     Replace element at index n with the new element newelem.

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

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

Methods inherited from scala/Function1-class
apply

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

Methods inherited from scala/ScalaObject-class
getScalaType

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

Methods inherited from scala/collection/mutable/Buffer-class
++, ++, ++:, ++=, ++=, +=, <<, append, appendAll, clone, hashCode, insert, prepend, prependAll, stringPrefix, trimEnd, trimStart

Methods inherited from scala/collection/mutable/Publisher-class
activateSubscription, publish, removeSubscription, removeSubscriptions, subscribe, subscribe, suspendSubscription

Method Detail

+

  override def +(element: 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 +:(element: A): Buffer[A]
Prepend a single element to this buffer and return the identity of the buffer.
Parameters:
elem - the element to append.

insertAll

  override 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

  override def update(n: Int, newelement: 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

  override 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

  override def clear: Unit
Clears the buffer contents.