package com.glezo.queueSet;

import java.util.ArrayList;

public class QueueSet<T>
{
	private ArrayList<T>	queue;
	
	//-------------------------------------------------------------------------------------------------------
	public QueueSet()						{	this.queue=new ArrayList<T>();								}
	//GETTERS------------------------------------------------------------------------------------------------
	public boolean contains(Object o)		{	return this.queue.contains(o);								}
	public boolean isEmpty()				{	return this.queue.isEmpty();								}
	public void add(T t)					{	if(!this.queue.contains(t)){this.queue.add(t);}				}
	public String toString()				{	return this.queue.toString();								}
	public ArrayList<T>	get_whole_queue()	{	return this.queue;											}	
	public T peek()							
	{	
		if(this.isEmpty())
		{
			return null;
		}
		return this.queue.get(0);	
	}
	public T poll()							
	{	
		if(this.isEmpty())
		{
			return null;
		}
		T t=this.queue.get(0);	
		this.queue.remove(0);	
		return t;	
	}
}

@@ -207,32 +207,36 @@
 ----------------
+----
 %0A%09public QueueSe
@@ -238,16 +238,17 @@
 eueSet()
+%09
 %09%09%09%09%09%09%7B%09
@@ -385,32 +385,36 @@
 ----------------
+----
 %0A%09public boolean
@@ -413,17 +413,18 @@
  boolean
- 
+%09%09
 contains
@@ -492,17 +492,18 @@
  boolean
- 
+%09%09
 isEmpty(
@@ -563,17 +563,19 @@
 void
- 
+%09%09%09
 add(T t)
 %09%09%09%09
@@ -570,17 +570,16 @@
 add(T t)
-%09
 %09%09%09%09%7B%09if
@@ -625,24 +625,87 @@
 d(t);%7D%09%09%09%09%7D%0A
+%09public int%09%09%09size()%09%09%09%09%09%7B%09return this.queue.size();%09%09%09%09%09%09%09%09%09%7D%0A
 %09public Stri
@@ -706,17 +706,18 @@
 c String
- 
+%09%09
 toString
@@ -801,16 +801,17 @@
 _queue()
+%09
 %09%7B%09retur

Update QueueSet.java