@Override @SuppressWarnings("unchecked") public Object remove(int index) { if ( index < 0 ) { throw new ArrayIndexOutOfBoundsException( "negative index" ); } final Object old = isPutQueueEnabled() ? readElementByIndex( index ) : UNKNOWN; elementRemoved = true; if ( old == UNKNOWN ) { write(); dirty(); return list.remove( index ); } else { queueOperation( new Remove( index, old ) ); return old; } }
@Override @SuppressWarnings("unchecked") public void operate() { list.remove( getIndex() ); } }
@Override @SuppressWarnings("unchecked") public E remove(int index) { if ( index < 0 ) { throw new ArrayIndexOutOfBoundsException( "negative index" ); } final Object old = isPutQueueEnabled() ? readElementByIndex( index ) : UNKNOWN; elementRemoved = true; if ( old == UNKNOWN ) { write(); dirty(); return list.remove( index ); } else { queueOperation( new Remove( index, old ) ); return (E) old; } }
/** * @see java.util.List#remove(int) */ public Object remove(int index) { if (index<0) { throw new ArrayIndexOutOfBoundsException("negative index"); } Object old = isPutQueueEnabled() ? readElementByIndex( index ) : UNKNOWN; if ( old==UNKNOWN ) { write(); return list.remove(index); } else { queueOperation( new Remove(index, old) ); return old; } }
/** * @see java.util.List#remove(int) */ public Object remove(int index) { if (index<0) { throw new ArrayIndexOutOfBoundsException("negative index"); } Object old = isPutQueueEnabled() ? readElementByIndex( index ) : UNKNOWN; if ( old==UNKNOWN ) { write(); return list.remove(index); } else { queueOperation( new Remove(index, old) ); return old; } }