Scala Library
|
|
scala/collection/mutable/History.scala
]
class
History[A, B]
extends
Subscriber[A, B] with
Iterable[(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.Value Summary | |
protected val
|
log : Queue[(B, A)] |
val
|
maxHistory : Int |
Method Summary | |
def
|
clear : Unit |
def
|
events : Iterator[A] |
def
|
iterator
: Iterator[(B, A)]
Creates a new iterator over all elements contained in this
iterable object.
|
def
|
notify (pub : B, event : A) : Unit |
override def
|
size
: Int
The number of elements in this collection
|
Methods inherited from Iterable | |
companion |
Methods inherited from IterableTemplate | |
elements, foreach, isEmpty, foldRight, reduceRight, toIterable, head, takeRight, dropRight, sameElements, toStream, view, view, first, firstOption, toSeq, projection |
Methods inherited from TraversableClass | |
newBuilder, genericBuilder, unzip, flatten, transpose |
Methods inherited from TraversableTemplate | |
thisCollection, nonEmpty, hasDefiniteSize, ++, ++, map, flatMap, filter, filterMap, filterNot, remove, partition, groupBy, forall, exists, count, find, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, headOption, tail, last, lastOption, init, take, drop, slice, takeWhile, dropWhile, span, splitAt, copyToBuffer, copyToArray, copyToArray, toArray, toList, toSequence, toSet, mkString, mkString, mkString, addString, addString, addString, toString, stringPrefix |
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 |
Method Details |
pub -
...event -
...override
def
size : Int
def
clear : Unit
Scala Library
|
|