public abstract class AbstractWaitlist<CollectionT extends java.util.Collection<AbstractState>> extends java.lang.Object implements Waitlist
Modifier and Type | Field and Description |
---|---|
protected CollectionT |
waitlist |
Modifier | Constructor and Description |
---|---|
protected |
AbstractWaitlist(CollectionT waitList)
Create a waitlist from a carrier collection.
|
Modifier and Type | Method and Description |
---|---|
void |
add(AbstractState abstractState)
Adds an abstract state.
|
void |
addAll(java.util.Collection<? extends AbstractState> abstractStates)
Adds multiple abstract states.
|
void |
clear()
Empties the waitlist.
|
boolean |
contains(AbstractState abstractState)
Checks whether the abstract state is present.
|
void |
forEach(java.util.function.Consumer<? super AbstractState> action) |
boolean |
isEmpty()
Checks whether the waitlist is empty.
|
@NotNull java.util.Iterator<AbstractState> |
iterator() |
boolean |
remove(AbstractState abstractState)
Removes an abstract state.
|
void |
removeAll(java.util.Collection<?> abstractStates)
Removes multiple abstract states.
|
int |
size()
Returns the size of the waitlist.
|
java.util.Spliterator<AbstractState> |
spliterator() |
protected final CollectionT extends java.util.Collection<AbstractState> waitlist
protected AbstractWaitlist(CollectionT waitList)
waitList
- the carrier collectionpublic void add(AbstractState abstractState)
Waitlist
public void addAll(java.util.Collection<? extends AbstractState> abstractStates)
Waitlist
public void clear()
Waitlist
public boolean contains(AbstractState abstractState)
Waitlist
public boolean isEmpty()
Waitlist
public boolean remove(AbstractState abstractState)
Waitlist
public void removeAll(java.util.Collection<?> abstractStates)
Waitlist
public int size()
Waitlist
@NotNull public @NotNull java.util.Iterator<AbstractState> iterator()
iterator
in interface java.lang.Iterable<AbstractState>
public void forEach(java.util.function.Consumer<? super AbstractState> action)
forEach
in interface java.lang.Iterable<AbstractState>
public java.util.Spliterator<AbstractState> spliterator()
spliterator
in interface java.lang.Iterable<AbstractState>