scala.collection.mutable

class History

[source: scala/collection/mutable/History.scala]

@serializable

class History[A, B]
extends Subscriber[A, B] with Collection[(B, A)]
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
Direct Known Subclasses:
RevertableHistory

Value Summary
protected val log : Queue[(B, A)]
val maxHistory : Int
Method Summary
def clear : Unit
def elements : Iterator[(B, A)]
Creates a new iterator over all elements contained in this object.
def events : Iterator[A]
def notify (pub : B, event : A) : Unit
override def size : Int
Returns the number of elements in this collection.
Methods inherited from Collection
toArray, toString, stringPrefix, equalWith
Methods inherited from Iterable
concat, ++, map, flatMap, filter, takeWhile, dropWhile, take, drop, foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, mkString, mkString, addString, addString, copyToArray, isEmpty, projection, hasDefiniteSize
Methods inherited from AnyRef
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Value Details
protected val log : Queue[(B, A)]

val maxHistory : Int

Method Details
def notify(pub : B, event : A) : Unit
Parameters
pub - ...
event - ...
Overrides
Subscriber.notify

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

def events : Iterator[A]

override def size : Int
Returns the number of elements in this collection.
Returns
number of collection elements.
Overrides
Collection.size

def clear : Unit