/** {@inheritDoc} */ @Override public E set(int index, E value) { if(!isWritable()) throw new IllegalStateException("List " + this.getClass().getName() + " cannot be modified in the current state"); if(index < 0 || index >= size()) throw new IndexOutOfBoundsException("Cannot set at " + index + " on list of size " + size()); return (E) source.set(getSourceIndex(index), (S) value); }
/** {@inheritDoc} */ @Override public E set(int index, E value) { if(!isWritable()) throw new IllegalStateException("List " + this.getClass().getName() + " cannot be modified in the current state"); if(index < 0 || index >= size()) throw new IndexOutOfBoundsException("Cannot set at " + index + " on list of size " + size()); return (E) source.set(getSourceIndex(index), (S) value); }
/** {@inheritDoc} */ @Override public E set(int index, E value) { if(!isWritable()) throw new IllegalStateException("List " + this.getClass().getName() + " cannot be modified in the current state"); if(index < 0 || index >= size()) throw new IndexOutOfBoundsException("Cannot set at " + index + " on list of size " + size()); return (E) source.set(getSourceIndex(index), (S) value); }
/** {@inheritDoc} */ @Override public E remove(int index) { if(!isWritable()) throw new IllegalStateException("Non-writable List cannot be modified"); if(index < 0 || index >= size()) throw new IndexOutOfBoundsException("Cannot remove at " + index + " on list of size " + size()); return (E) source.remove(getSourceIndex(index)); }
/** {@inheritDoc} */ @Override public E remove(int index) { if(!isWritable()) throw new IllegalStateException("Non-writable List cannot be modified"); if(index < 0 || index >= size()) throw new IndexOutOfBoundsException("Cannot remove at " + index + " on list of size " + size()); return (E) source.remove(getSourceIndex(index)); }
/** {@inheritDoc} */ @Override public E remove(int index) { if(!isWritable()) throw new IllegalStateException("Non-writable List cannot be modified"); if(index < 0 || index >= size()) throw new IndexOutOfBoundsException("Cannot remove at " + index + " on list of size " + size()); return (E) source.remove(getSourceIndex(index)); }
/** {@inheritDoc} */ @Override public void add(int index, E value) { if(!isWritable()) throw new IllegalStateException("Non-writable List cannot be modified"); if(index < 0 || index > size()) throw new IndexOutOfBoundsException("Cannot add at " + index + " on list of size " + size()); final int sourceIndex = index < size() ? getSourceIndex(index) : source.size(); source.add(sourceIndex, (S) value); }
/** {@inheritDoc} */ @Override public void add(int index, E value) { if(!isWritable()) throw new IllegalStateException("Non-writable List cannot be modified"); if(index < 0 || index > size()) throw new IndexOutOfBoundsException("Cannot add at " + index + " on list of size " + size()); final int sourceIndex = index < size() ? getSourceIndex(index) : source.size(); source.add(sourceIndex, (S) value); }
/** {@inheritDoc} */ @Override public void add(int index, E value) { if(!isWritable()) throw new IllegalStateException("Non-writable List cannot be modified"); if(index < 0 || index > size()) throw new IndexOutOfBoundsException("Cannot add at " + index + " on list of size " + size()); final int sourceIndex = index < size() ? getSourceIndex(index) : source.size(); source.add(sourceIndex, (S) value); }