K
- public class LimitedQueue<K>
extends java.util.ArrayList<K>
Constructor and Description |
---|
LimitedQueue(int size) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(K k) |
boolean |
addAll(java.util.Collection<? extends K> c) |
boolean |
addAll(int index,
java.util.Collection<? extends K> c) |
K |
getLast()
Provides access to the element inserted as last (the youngest element in the queue)
|
protected boolean |
limitSize() |
K |
peek()
Takes a peek at the element, which is the oldest one in the queue without removing it.
|
K |
poll()
Removes the oldest element in the list (FIFO)
|
add, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
public boolean add(K k)
public boolean addAll(java.util.Collection<? extends K> c)
protected boolean limitSize()
public boolean addAll(int index, java.util.Collection<? extends K> c)
public K getLast()
public K peek()
public K poll()