| Modifier | Constructor and Description |
|---|---|
protected |
JsFifo() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all items in the queue.
|
boolean |
contains(E item)
Check if this queue contains the given item.
|
Iterable<E> |
forEach() |
Fifo<E> |
give(E item)
Analagous to add(), however, we do not use the standard naming convention,
to avoid interface clashes with adapter types in collection libraries
that may wish to override our Fifo with their own type.
|
Fifo<E> |
giveAll(E... elements)
Analagous to addAll(), however, we avoid the standard naming convention,
so we can provide a fluent, strongly typed api.
|
Fifo<E> |
giveAll(Iterable<E> elements)
Analagous to addAll(), however, we avoid the standard naming convention,
so we can provide a fluent, strongly typed api.
|
boolean |
isEmpty()
Fastest way to tell if the queue is drained.
|
Iterator<E> |
iterator() |
String |
join(String delim) |
static <E> Fifo<E> |
newFifo() |
boolean |
remove(E item)
Manually remove the item from queue.
|
int |
size()
Return a count of items in the queue.
|
E |
take()
Analagous to poll(); retrieves and removes head.
|
public static <E> Fifo<E> newFifo()
public final void clear()
Fifopublic final boolean contains(E item)
Fifopublic final Fifo<E> give(E item)
Fifopublic final Fifo<E> giveAll(E... elements)
Fifopublic final Fifo<E> giveAll(Iterable<E> elements)
Fifopublic final boolean isEmpty()
Fifopublic final boolean remove(E item)
Fifopublic final int size()
Fifopublic final E take()
FifoCopyright © December 07, 2012–2015 The Internet Party. All rights reserved.