Packages

class WorkList[T] extends AnyRef

Fast, small, and dirty implementation of a linked list that removes transient work entries once they are processed. The list is not thread safe! However it is expected to be reentrant. This means a processing function can add/remove entries from the list while processing. Most important, a processing function can remove its own entry from the list. The first remove must return true and any subsequent removes must return false.

Annotations
@deprecated
Deprecated

(Since version 2.5.0) Feel free to copy

Source
Aggregator.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WorkList
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new WorkList()

Value Members

  1. def add(ref: T, permanent: Boolean): WorkList[T]

    Appends an entry to the work list.

    Appends an entry to the work list.

    ref

    The entry.

    returns

    The updated work list.

  2. def addAll(other: WorkList[T]): WorkList[T]

    Appends another WorkList to this WorkList.

    Appends another WorkList to this WorkList.

    other

    The other WorkList

    returns

    This WorkList

  3. val head: Entry[T]
  4. def process(processFn: (T) ⇒ Boolean): Boolean

    Tries to process each entry using the processing function.

    Tries to process each entry using the processing function. Stops at the first entry processing succeeds. If the entry is not permanent, the entry is removed.

    processFn

    The processing function, returns true if processing succeeds.

    returns

    true if an entry has been processed, false if no entries are processed successfully.

  5. def remove(ref: T): Boolean

    Removes an entry from the work list

    Removes an entry from the work list

    ref

    The entry.

    returns

    True if the entry is removed, false if the entry is not found.

  6. def removeAll(): Boolean

    Removes all entries from this WorkList

    Removes all entries from this WorkList

    returns

    True if at least one entry is removed. False if none is removed.

  7. var tail: Entry[T]