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 +(elem: A): Buffer[A]
Append a single element to this buffer and return
the identity of the buffer.
|
override
|
def +:(elem: 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, newelem: A): Unit
Replace element at index n with the new element
newelem .
|
Methods inherited from java/lang/Object-class
|
eq, equals, finalize, getClass, notify, notifyAll, synchronized, wait, wait, wait |
Methods inherited from scala/collection/mutable/Buffer-class
|
++, ++, ++:, ++=, ++=, +=, <<, append, appendAll, clone, hashCode, insert, prepend, prependAll, stringPrefix, trimEnd, trimStart |
+
override 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): 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, 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
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.