@Test public void testRemove() { fill(); int size = CAPACITY; Assert.assertEquals(size, buffer.size()); Assert.assertEquals(TEXT_LENGTH, buffer.end()); Assert.assertTrue(buffer.isFull()); long start = buffer.start(); for (int i = 0; i < CAPACITY; i++) { Assert.assertEquals(expectedSymbol(start), buffer.remove()); ++start; --size; Assert.assertEquals(start, buffer.start()); Assert.assertEquals(TEXT_LENGTH, buffer.end()); Assert.assertFalse(buffer.isFull()); Assert.assertEquals(size, buffer.size()); } Assert.assertEquals(0, buffer.size()); Assert.assertTrue(buffer.isEmpty()); }
@Override public S remove() { if (isEmpty()) { throw new IllegalStateException(); } final S removed = symbolAt(iStart); ++iStart; return removed; }
TailBuffer implements ITailBuffer<S> { @Override public S remove() { if (isEmpty()) { throw new IllegalStateException(); } final S removed = symbolAt(iStart); ++iStart; return removed; } }
TailBuffer implements ITailBuffer<S> { @Override public S remove() { if (isEmpty()) { throw new IllegalStateException(); } final S removed = symbolAt(iStart); ++iStart; return removed; } TailBuffer(final int capacity_);  TailBuffer(); }
TailBuffer implements ITailBuffer<S> { @Override public S remove() { if (isEmpty()) { throw new IllegalStateException(); } final S removed = symbolAt(iStart); ++iStart; return removed; } TailBuffer(final int capacity_);  TailBuffer(); @Override void add(final S symbol_); @Override int capacity(); @Override void clear(); @Override long end(); @Override boolean isEmpty(); @Override boolean isFull(); @Override S remove(); @Override int size(); @Override long start(); @SuppressWarnings("unchecked") @Override S symbolAt(final long iPosition_); @Override String toString(); }
TailBuffer implements ITailBuffer<S> { @Override public S remove() { if (isEmpty()) { throw new IllegalStateException(); } final S removed = symbolAt(iStart); ++iStart; return removed; } TailBuffer(final int capacity_);  TailBuffer(); @Override void add(final S symbol_); @Override int capacity(); @Override void clear(); @Override long end(); @Override boolean isEmpty(); @Override boolean isFull(); @Override S remove(); @Override int size(); @Override long start(); @SuppressWarnings("unchecked") @Override S symbolAt(final long iPosition_); @Override String toString(); static final int DEFAULT_CAPACITY; }