@Override public void remove() { if (last == -1) throw new IllegalStateException(); BooleanArrayList.this.removeBoolean(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 boolean k) { int index = indexOf(k); if (index == -1) return false; removeBoolean(index); assert size <= a.length; return true; } @Override