18 #ifndef _DECAF_UTIL_DEQUE_H_ 19 #define _DECAF_UTIL_DEQUE_H_ 79 virtual void addLast(
const E& element ) = 0;
96 virtual bool offerFirst(
const E& element ) = 0;
113 virtual bool offerLast(
const E& element ) = 0;
143 virtual bool pollFirst( E& element ) = 0;
153 virtual bool pollLast( E& element ) = 0;
164 virtual const E&
getFirst()
const = 0;
175 virtual const E&
getLast()
const = 0;
185 virtual bool peekFirst( E& value )
const = 0;
195 virtual bool peekLast( E& value )
const = 0;
242 virtual void push(
const E& element ) = 0;
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 removeLastOccurrence(const E &value)=0
Removes the last occurrence of the specified element from this Deque.
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 E element() const =0
Gets but not removes the element in the head of the queue.
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 void addFirst(const E &element)=0
Inserts an element onto the front of the Deque if possible without violating the implementations capa...
virtual void addLast(const E &element)=0
Inserts an element onto the end of the Deque if possible without violating the implementations capaci...
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 ~Deque()
Definition: Deque.h:45
virtual bool peekLast(E &value) const =0
Retrieves the last element contained in this Deque and assigns its value to the reference value passe...
Defines an object that can be used to iterate over the elements of a collection.
Definition: Iterator.h:34
virtual bool removeFirstOccurrence(const E &value)=0
Removes the first occurrence of the specified element from this Deque.
A kind of collection provides advanced operations than other basic collections, such as insertion...
Definition: Queue.h:55
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 E removeFirst()=0
Removes the topmost element from the Deque and returns it.
virtual E removeLast()=0
Removes the last element from the Deque and returns it.
virtual E pop()=0
Treats this Deque as a stack and attempts to pop an element off the top.
Defines a 'Double ended Queue' interface that allows for insertion and removal of elements from both ...
Definition: Deque.h:42
virtual E & getFirst()=0
Attempts to fetch a reference to the first element in the Deque.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25