public class WorkList<T>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
WorkList.Entry<T>
Singly linked list entry implementation for WorkList.
|
Constructor and Description |
---|
WorkList() |
Modifier and Type | Method and Description |
---|---|
WorkList<T> |
add(T ref,
boolean permanent)
Appends an entry to the work list.
|
WorkList<T> |
addAll(WorkList<T> other)
Appends another WorkList to this WorkList.
|
static <T> WorkList<T> |
empty() |
WorkList.Entry<T> |
head() |
boolean |
process(scala.Function1<T,java.lang.Object> processFn)
Tries to process each entry using the processing function.
|
boolean |
remove(T ref)
Removes an entry from the work list
|
boolean |
removeAll()
Removes all entries from this WorkList
|
WorkList.Entry<T> |
tail() |
public static <T> WorkList<T> empty()
public WorkList.Entry<T> head()
public WorkList.Entry<T> tail()
public WorkList<T> add(T ref, boolean permanent)
ref
- The entry.permanent
- (undocumented)public boolean remove(T ref)
ref
- The entry.public boolean process(scala.Function1<T,java.lang.Object> processFn)
processFn
- The processing function, returns true if processing succeeds.public WorkList<T> addAll(WorkList<T> other)
other
- The other WorkListpublic boolean removeAll()