scala.collection.mutable

History

class History[Evt, Pub] extends Subscriber[Evt, Pub] with Iterable[(Pub, Evt)]

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.

known subclasses: RevertibleHistory

Inherits

  1. Iterable
  2. Iterable
  3. IterableLike
  4. Equals
  5. Traversable
  6. Mutable
  7. Traversable
  8. GenericTraversableTemplate
  9. TraversableLike
  10. HasNewBuilder
  11. Subscriber
  12. AnyRef
  13. Any

Type Members

  1. class WithFilter extends AnyRef

    A class supporting filtered operations

Value Members

  1. def ++[B >: (Pub, Evt), That](that: Iterator[B])(bf: CanBuildFrom[Iterable[(Pub, Evt)], B, That]): That

    Concatenates this iterable collection with the elements of an iterator

  2. def ++[B >: (Pub, Evt), That](that: Traversable[B])(bf: CanBuildFrom[Iterable[(Pub, Evt)], B, That]): That

    Concatenates this iterable collection with the elements of a traversable collection

  3. def /:[B](z: B)(op: (B, (Pub, Evt)) ⇒ B): B

    Applies a binary operator to a start value and all elements of this iterable collection, going left to right

  4. def :\[B](z: B)(op: ((Pub, Evt), B) ⇒ B): B

    Applies a binary operator to all elements of this iterable collection and a start value, going right to left

  5. def addString(b: StringBuilder): StringBuilder

    Appends all elements of this iterable collection to a string builder

  6. def addString(b: StringBuilder, sep: String): StringBuilder

    Appends all elements of this iterable collection to a string builder using a separator string

  7. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder

    Appends all elements of this iterable collection to a string builder using start, end, and separator strings

  8. def canEqual(that: Any): Boolean

    Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind

  9. def clear(): Unit

  10. def companion: GenericCompanion[Iterable[A][A]]

    The factory companion object that builds instances of class Iterable

  11. def copyToArray[B >: (Pub, Evt)](xs: Array[B], start: Int, len: Int): Unit

    Copies elements of this iterable collection to an array

  12. def copyToArray[B >: (Pub, Evt)](xs: Array[B]): Unit

    Copies elements of this iterable collection to an array

  13. def copyToArray[B >: (Pub, Evt)](xs: Array[B], start: Int): Unit

    Copies elements of this iterable collection to an array

  14. def copyToBuffer[B >: (Pub, Evt)](dest: Buffer[B]): Unit

    Copies all elements of this iterable collection to a buffer

  15. def count(p: ((Pub, Evt)) ⇒ Boolean): Int

    Counts the number of elements in the iterable collection which satisfy a predicate

  16. def drop(n: Int): Iterable[(Pub, Evt)]

    Selects all elements except first n ones

  17. def dropRight(n: Int): Iterable[(Pub, Evt)]

    Selects all elements except first n ones

  18. def dropWhile(p: ((Pub, Evt)) ⇒ Boolean): Iterable[(Pub, Evt)]

    Drops longest prefix of elements that satisfy a predicate

  19. def elements: Iterator[(Pub, Evt)]

  20. def equals(obj: Any): Boolean

    Checks if two history objects are structurally identical

  21. def events: Iterator[Evt]

  22. def exists(p: ((Pub, Evt)) ⇒ Boolean): Boolean

    Tests whether a predicate holds for some of the elements of this iterable collection

  23. def filter(p: ((Pub, Evt)) ⇒ Boolean): Iterable[(Pub, Evt)]

    Selects all elements of this iterable collection which satisfy a predicate

  24. def filterNot(p: ((Pub, Evt)) ⇒ Boolean): Iterable[(Pub, Evt)]

    Selects all elements of this iterable collection which do not satisfy a predicate

  25. def find(p: ((Pub, Evt)) ⇒ Boolean): Option[(Pub, Evt)]

    Finds the first element of the iterable collection satisfying a predicate, if any

  26. def first: (Pub, Evt)

  27. def firstOption: Option[(Pub, Evt)]

    None if iterable is empty

  28. def flatMap[B, That](f: ((Pub, Evt)) ⇒ Traversable[B])(bf: CanBuildFrom[Iterable[(Pub, Evt)], B, That]): That

    Builds a new collection by applying a function to all elements of this iterable collection and concatenating the results

  29. def flatten[B](asTraversable: ((Pub, Evt)) ⇒ Traversable[B]): Iterable[B]

    Converts this iterable collection of traversable collections into a iterable collection in which all element collections are concatenated

  30. def foldLeft[B](z: B)(op: (B, (Pub, Evt)) ⇒ B): B

    Applies a binary operator to a start value and all elements of this iterable collection, going left to right

  31. def foldRight[B](z: B)(op: ((Pub, Evt), B) ⇒ B): B

    Applies a binary operator to all elements of this iterable collection and a start value, going right to left

  32. def forall(p: ((Pub, Evt)) ⇒ Boolean): Boolean

    Tests whether a predicate holds for all elements of this iterable collection

  33. def foreach[U](f: ((Pub, Evt)) ⇒ U): Unit

    Applies a function f to all elements of this iterable collection

  34. def genericBuilder[B]: Builder[B, Iterable[B]]

    The generic builder that builds instances of Iterable at arbitrary element types

  35. def groupBy[K](f: ((Pub, Evt)) ⇒ K): Map[K, Iterable[(Pub, Evt)]]

    Partitions this iterable collection into a map of iterable collections according to some discriminator function

  36. def hasDefiniteSize: Boolean

    Tests whether this iterable collection is known to have a finite size

  37. def hashCode(): Int

    Returns a hash code value for the object

  38. def head: (Pub, Evt)

    Selects the first element of this iterable collection

  39. def headOption: Option[(Pub, Evt)]

    Optionally selects the first element

  40. def init: Iterable[(Pub, Evt)]

    Selects all elements except the last

  41. def isEmpty: Boolean

    Tests whether this iterable collection is empty

  42. def iterator: Iterator[(Pub, Evt)]

    Creates a new iterator over all elements contained in this iterable object

  43. def last: (Pub, Evt)

    Selects the last element

  44. def lastOption: Option[(Pub, Evt)]

    Optionally selects the last element

  45. def map[B, That](f: ((Pub, Evt)) ⇒ B)(bf: CanBuildFrom[Iterable[(Pub, Evt)], B, That]): That

    Builds a new collection by applying a function to all elements of this iterable collection

  46. def max[B >: (Pub, Evt)](cmp: Ordering[B]): (Pub, Evt)

    Finds the largest element

  47. val maxHistory: Int

  48. def min[B >: (Pub, Evt)](cmp: Ordering[B]): (Pub, Evt)

    Finds the smallest element

  49. def mkString: String

    Displays all elements of this iterable collection in a string

  50. def mkString(sep: String): String

    Displays all elements of this iterable collection in a string using a separator string

  51. def mkString(start: String, sep: String, end: String): String

    Displays all elements of this iterable collection in a string using start, end, and separator strings

  52. def nonEmpty: Boolean

    Tests whether the iterable collection is not empty

  53. def notify(pub: Pub, event: Evt): Unit

  54. def partialMap[B, That](pf: PartialFunction[(Pub, Evt), B])(bf: CanBuildFrom[Iterable[(Pub, Evt)], B, That]): That

    Builds a new collection by applying a partial function to all elements of this iterable collection on which the function is defined

  55. def partition(p: ((Pub, Evt)) ⇒ Boolean): (Iterable[(Pub, Evt)], Iterable[(Pub, Evt)])

    Partitions this iterable collection in two iterable collections according to a predicate

  56. def product[B >: (Pub, Evt)](num: Numeric[B]): B

    Multiplies up the elements of this collection

  57. def projection: IterableView[(Pub, Evt), Iterable[(Pub, Evt)]]

    returns a projection that can be used to call non-strict filter,map, and flatMap methods that build projections of the collection

  58. def reduceLeft[B >: (Pub, Evt)](op: (B, (Pub, Evt)) ⇒ B): B

    Applies a binary operator to all elements of this iterable collection, going left to right

  59. def reduceLeftOption[B >: (Pub, Evt)](op: (B, (Pub, Evt)) ⇒ B): Option[B]

    Optionally applies a binary operator to all elements of this iterable collection, going left to right

  60. def reduceRight[B >: (Pub, Evt)](op: ((Pub, Evt), B) ⇒ B): B

    Applies a binary operator to all elements of this iterable collection, going right to left

  61. def reduceRightOption[B >: (Pub, Evt)](op: ((Pub, Evt), B) ⇒ B): Option[B]

    Optionally applies a binary operator to all elements of this iterable collection, going right to left

  62. def repr: Iterable[(Pub, Evt)]

    The collection of type iterable collection underlying this TraversableLike object

  63. def sameElements[B >: (Pub, Evt)](that: Iterable[B]): Boolean

    Checks if the other iterable collection contains the same elements in the same order as this iterable collection

  64. def size: Int

    The size of this iterable collection

  65. def slice(from: Int, until: Int): Iterable[(Pub, Evt)]

    Selects an interval of elements

  66. def span(p: ((Pub, Evt)) ⇒ Boolean): (Iterable[(Pub, Evt)], Iterable[(Pub, Evt)])

    Spits this iterable collection into a prefix/suffix pair according to a predicate

  67. def splitAt(n: Int): (Iterable[(Pub, Evt)], Iterable[(Pub, Evt)])

    Splits this iterable collection into two at a given position

  68. def stringPrefix: String

    Defines the prefix of this object's toString representation

  69. def sum[B >: (Pub, Evt)](num: Numeric[B]): B

    Sums up the elements of this collection

  70. def tail: Iterable[(Pub, Evt)]

    Selects all elements except the first

  71. def take(n: Int): Iterable[(Pub, Evt)]

    Selects first n elements

  72. def takeRight(n: Int): Iterable[(Pub, Evt)]

    Selects last n elements

  73. def takeWhile(p: ((Pub, Evt)) ⇒ Boolean): Iterable[(Pub, Evt)]

    Takes longest prefix of elements that satisfy a predicate

  74. def toArray[B >: (Pub, Evt)](arg0: ClassManifest[B]): Array[B]

    Converts this iterable collection to an array

  75. def toIndexedSeq[B >: (Pub, Evt)]: IndexedSeq[B]

    Converts this iterable collection to an indexed sequence

  76. def toIterable: Iterable[(Pub, Evt)]

    Converts this iterable collection to an iterable collection

  77. def toList: List[(Pub, Evt)]

    Converts this iterable collection to a list

  78. def toSeq: Seq[(Pub, Evt)]

    Converts this iterable collection to a sequence

  79. def toSet[B >: (Pub, Evt)]: Set[B]

    Converts this iterable collection to a set

  80. def toStream: Stream[(Pub, Evt)]

    Converts this iterable collection to a stream

  81. def toString(): String

    Converts this iterable collection to a string

  82. def transpose[B](asTraversable: ((Pub, Evt)) ⇒ Traversable[B]): Iterable[Iterable[B]]

    Transposes this iterable collection of traversable collections into

  83. def unzip[A1, A2](asPair: ((Pub, Evt)) ⇒ (A1, A2)): (Iterable[A1], Iterable[A2])

    Converts this iterable collection of pairs into two collections of the first and second halfs of each pair

  84. def view(from: Int, until: Int): IterableView[(Pub, Evt), Iterable[(Pub, Evt)]]

    Creates a non-strict view of a slice of this iterable collection

  85. def view: IterableView[(Pub, Evt), Iterable[(Pub, Evt)]]

    Creates a non-strict view of this iterable collection

  86. def withFilter(p: ((Pub, Evt)) ⇒ Boolean): WithFilter

    Creates a non-strict filter of this iterable collection

  87. def zip[A1 >: (Pub, Evt), B, That](that: Iterable[B])(bf: CanBuildFrom[Iterable[(Pub, Evt)], (A1, B), That]): That

    Returns a iterable collection formed from this iterable collection and another iterable collection by combining corresponding elements in pairs

  88. def zipAll[B, A1 >: (Pub, Evt), That](that: Iterable[B], thisElem: A1, thatElem: B)(bf: CanBuildFrom[Iterable[(Pub, Evt)], (A1, B), That]): That

    Returns a iterable collection formed from this iterable collection and another iterable collection by combining corresponding elements in pairs

  89. def zipWithIndex[A1 >: (Pub, Evt), That](bf: CanBuildFrom[Iterable[(Pub, Evt)], (A1, Int), That]): That

    Zips this iterable collection with its indices

Instance constructors

  1. new History()