public E dequeue() {
        if (dequeue >= 0 && dequeue < queue.getSize()) {
            final E returnValue = (E) queue.get(dequeue);
            dequeue++;
            return returnValue;
        } else {
            return null;
        }
    }