/** * Replaces the last element returned by next or previous with the * specified element (optional operation). */ public void set(E o) { if(lastIndex == -1) throw new IllegalStateException("Cannot set() without a prior call to next() or previous()"); source.set(lastIndex, o); }
/** * Replaces the last element returned by next or previous with the * specified element (optional operation). */ @Override public void set(E o) { if(lastIndex == -1) throw new IllegalStateException("Cannot set() without a prior call to next() or previous()"); source.set(lastIndex, o); }
/** * Replaces the last element returned by next or previous with the * specified element (optional operation). */ public void set(E o) { if(lastIndex == -1) throw new IllegalStateException("Cannot set() without a prior call to next() or previous()"); source.set(lastIndex, o); }
/** * The CheckableWrapperList supports only one write operation, which is to * force an update on a specified value. This requires that the parameter * value is an instance of CheckWrapped, which is the only value that this * list supports. */ @Override public CheckWrapped<S> set(int index, CheckWrapped<S> value) { source.set(index, value.getWrapped()); return value; }
/** * The CheckableWrapperList supports only one write operation, which is to * force an update on a specified value. This requires that the parameter * value is an instance of CheckWrapped, which is the only value that this * list supports. */ @Override public CheckWrapped<S> set(int index, CheckWrapped<S> value) { source.set(index, value.getWrapped()); return value; }
/** * The CheckableWrapperList supports only one write operation, which is to * force an update on a specified value. This requires that the parameter * value is an instance of CheckWrapped, which is the only value that this * list supports. */ @Override public CheckWrapped<S> set(int index, CheckWrapped<S> value) { source.set(index, value.getWrapped()); return value; }
/** * {@inheritDoc} */ @Override public E set(int index, E element) { return supplyInsideLock(() -> delegate.set(index, element)); }
private void update(EventList<Element> baseList) { for (int i = 0; i < baseSize / 2; i++) { int group = dice.nextInt(baseSize); for (int j = 0; j < groupElementCount / 2; j++) { int index = dice.nextInt(baseSize * groupElementCount); if (index < baseList.size()) { baseList.set(index, new Element(group, -j)); } } } }
/** {@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) { final E updated = get(index); source.set(index, reverse(value)); return updated; }
/** {@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) { beforeWriteOperation(); try { return delegate.set(index, value); } finally { afterWriteOperation(); } }
/** {@inheritDoc} */ @Override public E set(int index, E value) { final E updated = get(index); source.set(index, reverse(value)); return updated; }
/** {@inheritDoc} */ @Override public E set(int index, E value) { final E updated = get(index); source.set(index, reverse(value)); return updated; }
/** {@inheritDoc} */ @Override public E set(int index, E value) { beforeWriteOperation(); try { return delegate.set(index, value); } finally { afterWriteOperation(); } }
/** {@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) { getReadWriteLock().writeLock().lock(); try { return source.set(index, value); } finally { getReadWriteLock().writeLock().unlock(); } }
/** * {@inheritDoc} */ @Override public E set(int index, E element) { source.getReadWriteLock().writeLock().lock(); try { return source.set(index, element); } finally { source.getReadWriteLock().writeLock().unlock(); } }
/** {@inheritDoc} */ @Override public E set(int index, E value) { getReadWriteLock().writeLock().lock(); try { return source.set(index, value); } finally { getReadWriteLock().writeLock().unlock(); } }
/** {@inheritDoc} */ @Override public E set(int index, E value) { getReadWriteLock().writeLock().lock(); try { return source.set(index, value); } finally { getReadWriteLock().writeLock().unlock(); } }