@Override @SuppressWarnings("unchecked") public boolean retainAll(Collection coll) { initialize( true ); if ( list.retainAll( coll ) ) { dirty(); return true; } else { return false; } }
@Override @SuppressWarnings("unchecked") public boolean removeAll(Collection coll) { if ( coll.size()>0 ) { initialize( true ); if ( list.removeAll( coll ) ) { elementRemoved = true; dirty(); return true; } else { return false; } } else { return false; } }
@Override @SuppressWarnings("unchecked") public void clear() { if ( isClearQueueEnabled() ) { queueOperation( new Clear() ); } else { initialize( true ); if ( ! list.isEmpty() ) { list.clear(); dirty(); } } }
@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 public boolean remove(Object value) { final Boolean exists = isPutQueueEnabled() ? readElementExistence( value ) : null; if ( exists == null ) { initialize( true ); if ( list.remove( value ) ) { elementRemoved = true; dirty(); return true; } else { return false; } } else if ( exists ) { elementRemoved = true; queueOperation( new SimpleRemove( value ) ); return true; } else { return false; } }
/** * @see java.util.List#retainAll(Collection) */ public boolean retainAll(Collection coll) { initialize( true ); if ( list.retainAll( coll ) ) { dirty(); return true; } else { return false; } }
/** * @see java.util.List#retainAll(Collection) */ public boolean retainAll(Collection coll) { initialize( true ); if ( list.retainAll( coll ) ) { dirty(); return true; } else { return false; } }
@Override @SuppressWarnings("unchecked") public boolean retainAll(Collection coll) { initialize( true ); if ( list.retainAll( coll ) ) { dirty(); return true; } else { return false; } }
/** * @see java.util.List#removeAll(Collection) */ public boolean removeAll(Collection coll) { if ( coll.size()>0 ) { initialize( true ); if ( list.removeAll( coll ) ) { dirty(); return true; } else { return false; } } else { return false; } }
/** * @see java.util.List#removeAll(Collection) */ public boolean removeAll(Collection coll) { if ( coll.size()>0 ) { initialize( true ); if ( list.removeAll( coll ) ) { dirty(); return true; } else { return false; } } else { return false; } }
@Override @SuppressWarnings("unchecked") public boolean removeAll(Collection coll) { if ( coll.size()>0 ) { initialize( true ); if ( list.removeAll( coll ) ) { elementRemoved = true; dirty(); return true; } else { return false; } } else { return false; } }
/** * @see java.util.List#clear() */ public void clear() { if ( isClearQueueEnabled() ) { queueOperation( new Clear() ); } else { initialize( true ); if ( ! list.isEmpty() ) { list.clear(); dirty(); } } }
/** * @see java.util.List#clear() */ public void clear() { if ( isClearQueueEnabled() ) { queueOperation( new Clear() ); } else { initialize( true ); if ( ! list.isEmpty() ) { list.clear(); dirty(); } } }
@Override @SuppressWarnings("unchecked") public void clear() { if ( isClearQueueEnabled() ) { queueOperation( new Clear() ); } else { initialize( true ); if ( ! list.isEmpty() ) { list.clear(); dirty(); } } }
@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(Object) */ public boolean remove(Object value) { Boolean exists = isPutQueueEnabled() ? readElementExistence(value) : null; if ( exists == null ) { initialize( true ); if ( list.remove( value ) ) { dirty(); return true; } else { return false; } } else if ( exists.booleanValue() ) { queueOperation( new SimpleRemove(value) ); return true; } else { return false; } }
/** * @see java.util.List#remove(Object) */ public boolean remove(Object value) { Boolean exists = isPutQueueEnabled() ? readElementExistence(value) : null; if ( exists == null ) { initialize( true ); if ( list.remove( value ) ) { dirty(); return true; } else { return false; } } else if ( exists.booleanValue() ) { queueOperation( new SimpleRemove(value) ); return true; } else { return false; } }
@Override public boolean remove(Object value) { final Boolean exists = isPutQueueEnabled() ? readElementExistence( value ) : null; if ( exists == null ) { initialize( true ); if ( list.remove( value ) ) { elementRemoved = true; dirty(); return true; } else { return false; } } else if ( exists ) { elementRemoved = true; queueOperation( new SimpleRemove( value ) ); return true; } else { return false; } }