Code example for Queue

Methods: isEmpty, remove

0
            return false; 
        } 
    } 
 
    public FaunusElement next() { 
        if (this.queue.isEmpty())
            return null; 
        else 
            return this.queue.remove();
    } 
 
    public boolean hasNext() { 
        return !this.queue.isEmpty();
    } 
 
    public void remove() { 
        throw new UnsupportedOperationException();
    } 
}