@Override public void remove() { if (last == -1) throw new IllegalStateException(); ByteArrayList.this.removeByte(last); /* * If the last operation was a next(), we are removing an element *before* us, * and we must decrease pos correspondingly. */ if (last < pos) pos--; last = -1; } };
@Override public boolean rem(final byte k) { int index = indexOf(k); if (index == -1) return false; removeByte(index); assert size <= a.length; return true; } @Override