@Override public void actionPerformed(ActionEvent actionEvent) { sillyObjects.remove(sillyObject); } }
/** * Removes from the list the last element that was returned by next * or previous (optional operation). */ public void remove() { if(lastIndex == -1) throw new IllegalStateException("Cannot remove() without a prior call to next() or previous()"); source.remove(lastIndex); }
/** * Removes from the list the last element that was returned by next * or previous (optional operation). */ public void remove() { if(lastIndex == -1) throw new IllegalStateException("Cannot remove() without a prior call to next() or previous()"); source.remove(lastIndex); }
/** * Removes from the list the last element that was returned by next * or previous (optional operation). */ @Override public void remove() { if(lastIndex == -1) throw new IllegalStateException("Cannot remove() without a prior call to next() or previous()"); source.remove(lastIndex); }
/** {@inheritDoc} */ @Override public E remove(int index) { final E removed = get(index); source.remove(index); return removed; }
/** * {@inheritDoc} */ @Override public E remove(int index) { return supplyInsideLock(() -> delegate.remove(index)); }
/** {@inheritDoc} */ @Override public E remove(int index) { final E removed = get(index); source.remove(index); return removed; }
private void delete(EventList<Element> baseList) { for (int i = 0; i < baseSize / 2; i++) { int startIndex = dice.nextInt(baseList.size() - groupElementCount); for (int j = 0; j < groupElementCount; j++) { int index = startIndex + j; if (index >= 0 && index < baseList.size()) { baseList.remove(index); } } } }
/** {@inheritDoc} */ @Override public E remove(int index) { beforeWriteOperation(); try { return delegate.remove(index); } finally { afterWriteOperation(); } }
/** {@inheritDoc} */ @Override public E remove(int index) { beforeWriteOperation(); try { return delegate.remove(index); } finally { afterWriteOperation(); } }
/** {@inheritDoc} */ @Override public E remove(int index) { beforeWriteOperation(); try { return delegate.remove(index); } finally { afterWriteOperation(); } }
/** {@inheritDoc} */ @Override public boolean remove(Object toRemove) { beforeWriteOperation(); try { return delegate.remove(toRemove); } finally { afterWriteOperation(); } }
/** {@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)); }
private void removeFromSelection(E item) { Lock lock = this.selectionList.getReadWriteLock().writeLock(); lock.lock(); try { this.selectionList.remove(item); } finally { lock.unlock(); } }
/** {@inheritDoc} */ @Override public E remove(int index) { getReadWriteLock().writeLock().lock(); try { return source.remove(index); } finally { getReadWriteLock().writeLock().unlock(); } }
/** {@inheritDoc} */ @Override public E remove(int index) { getReadWriteLock().writeLock().lock(); try { return source.remove(index); } finally { getReadWriteLock().writeLock().unlock(); } }
/** * {@inheritDoc} */ @Override public E remove(int index) { source.getReadWriteLock().writeLock().lock(); try { return source.remove(index); } finally { source.getReadWriteLock().writeLock().unlock(); } }
/** {@inheritDoc} */ @Override public boolean remove(Object toRemove) { getReadWriteLock().writeLock().lock(); try { return source.remove(toRemove); } finally { getReadWriteLock().writeLock().unlock(); } }
/** {@inheritDoc} */ @Override public E remove(int index) { getReadWriteLock().writeLock().lock(); try { return source.remove(index); } finally { getReadWriteLock().writeLock().unlock(); } }