From e2decb09ed9cbfad6e1c61b68e24423620d01ff3 Mon Sep 17 00:00:00 2001 From: Aleksandar Pokopec Date: Sat, 10 Apr 2010 15:20:46 +0000 Subject: More docs. No review. --- src/library/scala/collection/mutable/History.scala | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/library/scala/collection/mutable/History.scala') diff --git a/src/library/scala/collection/mutable/History.scala b/src/library/scala/collection/mutable/History.scala index 40ebfe5fa5..ffa3d6481a 100644 --- a/src/library/scala/collection/mutable/History.scala +++ b/src/library/scala/collection/mutable/History.scala @@ -13,14 +13,17 @@ package scala.collection package mutable -/** History[A, B] objects may subscribe to events of - * type A published by an object of type 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. + * up to maximum number of `maxHistory` events. * * @author Matthias Zenger * @version 1.0, 08/07/2003 * @since 1 + * + * @tparam Evt Type of events. + * @tparam Pub Type of publishers. */ @serializable @SerialVersionUID(5219213543849892588L) @@ -29,9 +32,10 @@ class History[Evt, Pub] extends Subscriber[Evt, Pub] with Iterable[(Pub, Evt)] protected val log: Queue[(Pub, Evt)] = new Queue val maxHistory: Int = 1000 - /** - * @param pub ... - * @param event ... + /** Notifies this listener with an event by enqueuing it in the log. + * + * @param pub the publisher. + * @param event the event. */ def notify(pub: Pub, event: Evt) { if (log.length >= maxHistory) -- cgit v1.2.3