Class Queue
- All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, Deque, List, Queue, SequencedCollection
A thin wrapper around a java collection that provides queue semantics (FIFO).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, reversed, set, size, spliterator, toArray, toArray
Methods inherited from class AbstractSequentialList
iterator
Methods inherited from class AbstractList
equals, hashCode, listIterator, subList
Methods inherited from class AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toString
Methods inherited from interface Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface List
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, replaceAll, retainAll, sort, subList
-
Constructor Details
-
Queue
public Queue() -
Queue
-
-
Method Details
-
enque
Enqueue's the specified object. Behaves as perCollection.add(Object)
-
deque
Dequeues an object from the beginning of the queue- Throws:
NoSuchElementException
- if this list is empty.
-
empty
Returns true is this queue is empty, false otherwise -
main
-