in scala/collection/mutable
class History

class History[A,B]()
extends Object
with ScalaObject
with Subscriber[A,B]
with Iterable[Tuple2[B,A]]
Implementing classes or objects:
class RevertableHistory[A<:Undoable,B]()

History[A, B] objects may subscribe to events of type A published by an object of type B. The history subscriber object records all published events up to maximum number of maxHistory events.
Author:
Matthias Zenger
Version:
1.0, 08/07/2003

Field Summary
protected val log: Queue[Tuple2[B,A]]
  val maxHistory: Int

Method Summary
  def clear: Unit
  def elements: Iterator[Tuple2[B,A]]
     Creates a new iterator over all elements contained in this object.
  def events: Iterator[A]
  def notify(pub: B, event: A): Unit
final def notify(): Unit
  def size: Int

Methods inherited from java/lang/Object-class
clone, eq, equals, finalize, getClass, hashCode, ne, notify, notifyAll, synchronized, toString, 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/ScalaObject-class
getScalaType

Field Detail

log

  protected val log: Queue[Tuple2[B,A]]

maxHistory

  val maxHistory: Int
Method Detail

notify

  def notify(pub: B, event: A): Unit

notify

  final def notify(): Unit

elements

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

events

  def events: Iterator[A]

size

  def size: Int

clear

  def clear: Unit