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
- Alphabetic
- By Inheritance
- WorkList
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new WorkList()
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (WorkList[T], B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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.
-
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate() @throws( ... )
- def ensuring(cond: (WorkList[T]) ⇒ Boolean, msg: ⇒ Any): WorkList[T]
- def ensuring(cond: (WorkList[T]) ⇒ Boolean): WorkList[T]
- def ensuring(cond: Boolean, msg: ⇒ Any): WorkList[T]
- def ensuring(cond: Boolean): WorkList[T]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val head: Entry[T]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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.
-
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.
-
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.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- var tail: Entry[T]
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def →[B](y: B): (WorkList[T], B)
Inherited from AnyRef
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
- Deprecated
(Since version ) see corresponding Javadoc for more information.
Inherited from Any
Ungrouped
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (WorkList[T], B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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.
-
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate() @throws( ... )
- def ensuring(cond: (WorkList[T]) ⇒ Boolean, msg: ⇒ Any): WorkList[T]
- def ensuring(cond: (WorkList[T]) ⇒ Boolean): WorkList[T]
- def ensuring(cond: Boolean, msg: ⇒ Any): WorkList[T]
- def ensuring(cond: Boolean): WorkList[T]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val head: Entry[T]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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.
-
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.
-
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.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- var tail: Entry[T]
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def →[B](y: B): (WorkList[T], B)
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
- Deprecated
(Since version ) see corresponding Javadoc for more information.