Filas em java

Boa noite Galera!
Tenho a seguinte classe Genérica, uma estrutura de dados para Filas Estáticas.
Gostaria de saber qual a melhor forma de percorrer uma fila? Procurar um elemento na fila mantendo a ordem da fila.

public class StaticQueue implements Queue {

// Index to the first element
protected int first;

// Index to the last element
protected int last;

// Generic array used to store the elements
protected E elements[];

public StaticQueue(int maxSize) {
	elements = (E[]) new Object[maxSize];
	first = last = -1;
}

/** Testes whether the queue is empty. */
public boolean isEmpty() {
	return first == -1;
}

public boolean isFull() {
	return first == ((last + 1) % elements.length);
}

/** Returns the number of elements in the queue. */
public int numElements() {
	if (isEmpty())
		return 0;
	else {
		int n = elements.length;

		return ((n + this.last - this.first) % n) + 1;
	}
}

/** Inspects the element at the front of the queue. */
public E front() throws UnderflowException {
	if (isEmpty())
		throw new UnderflowException();
	return elements[first];
}

/** Inspects the element at the back of the queue. */
public E back() throws UnderflowException {
	if (isEmpty())
		throw new UnderflowException();
	return elements[last];
}

/** Inserts an element at the rear of the queue. */
public void enqueue(E element) throws OverflowException {
	if (isFull())
		throw new OverflowException("Lista cheia");
	else {
		if (last == -1)
			first = last = 0;
		else
			last = (last + 1) % elements.length;
		elements[last] = element;
	}
}

/** Removes and return the element at the front of the queue. */
public E dequeue() throws UnderflowException {
	if (isEmpty())
		throw new UnderflowException();
	E element = elements[first];
	elements[first] = null; // p/ coleta de lixo
	if (first == last)
		first = last = -1;
	else
		first = (first + 1) % elements.length;

	return element;
}

}

A interface Queue estende a interface Iterable, teria que implementar o método:

Iterator<T> iterator();

Se não for o Queue do Java, insira a interface Iterable e implemente aquele método

Exemplo:

public Iterator<T> iterator() {
  return new Iterator() {
    int índice = 0;
    boolean hasNext() { return índice < size(); }
    T next() { return elements[índice++]; }
    void remove() { /* Do nothing */ }
  }
}

Pera ai, deixa eu ver se entendi.
Tenho que implementar a classe Iterator e criar esse método?

A melhor forma de percorrer uma fila é usando o iterable. Dessa forma é possível percorrer como as listas e vetores:

StaticQueue<String> queue;
for (String s : queue) {
  System.out.println(s);
}
public int indiceDo(E elemento) {
    int i = 0;
    for (E e : this) {
      if (e.equals(elemento)) return i;
      i++;
    }
    return -1; // não encontrou
}

Quando vc declarar:

public class StaticQueue<E> implements Queue<E>, Iterable<E> {

Automaticamente o IDE (Netbeans e o Eclipse) irá solicitar a implementação daquele método, se não for solicitado é porque já está implementado como default nas interfaces ou em algum outro lugar, neste caso TALVEZ não seja necessário sobrescrever aquele método, teria que testar.

Haaa entendi. Obrigado.