18#ifndef _DECAF_UTIL_DEQUE_H_
19#define _DECAF_UTIL_DEQUE_H_
Defines a 'Double ended Queue' interface that allows for insertion and removal of elements from both ...
Definition Deque.h:42
virtual const E & getFirst() const =0
virtual void addLast(const E &element)=0
Inserts an element onto the end of the Deque if possible without violating the implementations capaci...
virtual E removeFirst()=0
Removes the topmost element from the Deque and returns it.
virtual void push(const E &element)=0
Pushes an element onto the stack represented by this deque (in other words, at the head of this deque...
virtual E & getLast()=0
Attempts to fetch a reference to the last element in the Deque.
virtual bool pollFirst(E &element)=0
Removes the first element from the Deque assigns it to the element reference passed.
virtual bool offerFirst(const E &element)=0
This method attempts to insert the given element into the Deque at the front end.
virtual Iterator< E > * descendingIterator()=0
Provides an Iterator over this Collection that traverses the element in reverse order.
virtual E & getFirst()=0
Attempts to fetch a reference to the first element in the Deque.
virtual bool peekLast(E &value) const =0
Retrieves the last element contained in this Deque and assigns its value to the reference value passe...
virtual bool peekFirst(E &value) const =0
Retrieves the first element contained in this Deque and assigns its value to the reference value pass...
virtual void addFirst(const E &element)=0
Inserts an element onto the front of the Deque if possible without violating the implementations capa...
virtual bool removeLastOccurrence(const E &value)=0
Removes the last occurrence of the specified element from this Deque.
virtual bool offerLast(const E &element)=0
This method attempts to insert the given element into the Deque at the end.
virtual bool pollLast(E &element)=0
Removes the last element from the Deque assigns it to the element reference passed.
virtual bool removeFirstOccurrence(const E &value)=0
Removes the first occurrence of the specified element from this Deque.
virtual ~Deque()
Definition Deque.h:45
virtual Iterator< E > * descendingIterator() const =0
virtual E removeLast()=0
Removes the last element from the Deque and returns it.
virtual const E & getLast() const =0
virtual E pop()=0
Treats this Deque as a stack and attempts to pop an element off the top.
Defines an object that can be used to iterate over the elements of a collection.
Definition Iterator.h:34
A kind of collection provides advanced operations than other basic collections, such as insertion,...
Definition Queue.h:55
virtual E element() const =0
Gets but not removes the element in the head of the queue.
Definition AbstractCollection.h:33
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25