class ObservableBuffer extends ObservableListBase<E> implements Queue<E> {

    @Override
    public boolean offer(final E element)
    {
        boolean changed = false;
        synchronized (myQueue)
        {
            beginChange();
            while (remainingCapacity() < 1)
            {
                final E removedElement = myQueue.removeFirst();
                if (removedElement != null)
                {
                    nextRemove(0, removedElement);
                }
            }
            changed = myQueue.offer(element);
            if (changed)
            {
                nextAdd(myQueue.size() - 1, myQueue.size());
            }
            endChange();
        }
        return changed;
    }

    public  ObservableBuffer(final int capacity);

}