package queue;

import java.util.ArrayList;
import java.util.List;

public class ArrayListQueue<T> implements MyQueue<T> {
	
	private List<T> queue = new ArrayList<T>();
	
	@Override
	public boolean offer(T item) {
		return queue.add(item);
	}
	
	@Override
	public T remove() {
		return queue.remove(0);
	}
	
	@Override
	public T peek() {
		return queue.get(0);
	}
	
	@Override
	public int size() {
		return queue.size();
	}
	
	@Override
	public boolean isEmpty() {
		return queue.isEmpty();
	}
}
