//
// Created by yinus on 2016/4/2.
//
#ifndef DS_AA_QUEUE_H
#define DS_AA_QUEUE_H
#include "List.h"
template <typename Object>
class Queue {
public:
Queue():list(){}
~Queue(){}
bool empty()const {
return list.empty();
}
void clear(){
list.clear();
}
int size(){
return list.size();
}
void enQueue(const Object& x){
list.push_back(x);
}
void deQueue(){
list.pop_front();
}
Object& front(){
return list.front();
}
Object& back(){
return list.back();
}
private:
List<Object> list;
};
#endif //DS_AA_QUEUE_H