Interface WorkingSet<E>
-
- Type Parameters:
E- the type of the elements that this working set contains
- All Known Implementing Classes:
ConcurrentFIFOWorkingSet,ConcurrentLIFOWorkingSet,FIFOWorkingSet,LIFOWorkingSet,VisitOnceWorkingSet
public interface WorkingSet<E>A working set, containing items to be processed.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisEmpty()Yieldstrueif and only if this working set is empty.static <E> WorkingSet<E>of(java.lang.Class<? extends WorkingSet<E>> clazz)Yields aWorkingSetinstance by invoking a staticmk()method on the given class.Epeek()Returns the next element to be processed from this working set without removing it.Epop()Removes the next element to be processed from this working set and returns it.voidpush(E e)Pushes a new element into this working set.intsize()Yields the size of this working set, that is, the number of elements contained in it.
-
-
-
Method Detail
-
of
static <E> WorkingSet<E> of(java.lang.Class<? extends WorkingSet<E>> clazz) throws AnalysisSetupException
Yields aWorkingSetinstance by invoking a staticmk()method on the given class.- Type Parameters:
E- the type of elements contained in the working set- Parameters:
clazz- the class of the working set to create- Returns:
- an instance of working set of type
clazz - Throws:
AnalysisSetupException- if the working set cannot be created
-
push
void push(E e)
Pushes a new element into this working set.- Parameters:
e- the element
-
pop
E pop()
Removes the next element to be processed from this working set and returns it.- Returns:
- the next element to process
-
peek
E peek()
Returns the next element to be processed from this working set without removing it.- Returns:
- the next element to process
-
size
int size()
Yields the size of this working set, that is, the number of elements contained in it.- Returns:
- the size
-
isEmpty
boolean isEmpty()
Yieldstrueif and only if this working set is empty.- Returns:
trueif that condition holds
-
-