/** {@inheritDoc} */ @Override public ReadWriteLock getReadWriteLock() { return delegate.getReadWriteLock(); }
/** {@inheritDoc} */ @Override public ReadWriteLock getReadWriteLock() { return ((EventList) list).getReadWriteLock(); }
/** * Creates a {@link TransformedList} to transform the specified {@link EventList}. * * @param source the {@link EventList} to transform */ protected TransformedList(EventList<S> source) { super(source.getPublisher()); this.source = source; readWriteLock = source.getReadWriteLock(); }
/** * {@inheritDoc} */ @Override public boolean retainAll(Collection<?> c) { source.getReadWriteLock().writeLock().lock(); try { return source.retainAll(c); } finally { source.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(); } }
/** Helper method to create a SwingThreadProxyList with read locks. */ private static <E> EventList<E> createSwingThreadProxyList(EventList<E> source) { final EventList<E> result; source.getReadWriteLock().readLock().lock(); try { result = GlazedListsSwing.swingThreadProxyList(source); } finally { source.getReadWriteLock().readLock().unlock(); } return result; }
/** * Gets the size of the list. */ @Override public int getSize() { source.getReadWriteLock().readLock().lock(); try { return source.size(); } finally { source.getReadWriteLock().readLock().unlock(); } }
/** * {@inheritDoc} */ public EventList<E> getTogglingSelected() { source.getReadWriteLock().readLock().lock(); try { return listSelection.getTogglingSelected(); } finally { source.getReadWriteLock().readLock().unlock(); } }
/** * {@inheritDoc} */ public EventList<E> getTogglingDeselected() { source.getReadWriteLock().readLock().lock(); try { return listSelection.getTogglingDeselected(); } finally { source.getReadWriteLock().readLock().unlock(); } }
/** * {@inheritDoc} */ public EventList<E> getSelected() { source.getReadWriteLock().readLock().lock(); try { return listSelection.getSelected(); } finally { source.getReadWriteLock().readLock().unlock(); } }
/** * {@inheritDoc} */ public EventList<E> getTogglingDeselected() { source.getReadWriteLock().readLock().lock(); try { return listSelection.getTogglingDeselected(); } finally { source.getReadWriteLock().readLock().unlock(); } }
/** * Gets the size of the list. */ public int getSize() { source.getReadWriteLock().readLock().lock(); try { return source.size(); } finally { source.getReadWriteLock().readLock().unlock(); } }
/** * {@inheritDoc} */ @Override public boolean isEmpty() { source.getReadWriteLock().readLock().lock(); try { return source.isEmpty(); } finally { source.getReadWriteLock().readLock().unlock(); } }
/** * {@inheritDoc} */ @Override public <T> T[] toArray(T[] a) { source.getReadWriteLock().readLock().lock(); try { return source.toArray(a); } finally { source.getReadWriteLock().readLock().unlock(); } }
/** * {@inheritDoc} */ @Override public boolean addAll(Collection<? extends E> c) { source.getReadWriteLock().writeLock().lock(); try { return source.addAll(c); } finally { source.getReadWriteLock().writeLock().unlock(); } }
/** * {@inheritDoc} */ @Override public void clear() { source.getReadWriteLock().writeLock().lock(); try { source.clear(); } finally { source.getReadWriteLock().writeLock().unlock(); } }
/** * {@inheritDoc} */ @Override public E remove(int index) { source.getReadWriteLock().writeLock().lock(); try { return source.remove(index); } finally { source.getReadWriteLock().writeLock().unlock(); } }
/** * Provides access to an {@link EventList} that contains items from the * viewed Table that are not currently selected. */ public EventList<E> getDeselected() { source.getReadWriteLock().readLock().lock(); try { return selection.getSelectionList().getDeselected(); } finally { source.getReadWriteLock().readLock().unlock(); } }
* Provides access to an {@link EventList} that contains items from the * viewed {@link Table} that are not currently selected. */ public EventList<E> getDeselected() { source.getReadWriteLock().readLock().lock(); try { return selection.getSelectionList().getDeselected(); } finally { source.getReadWriteLock().readLock().unlock(); } } /**
private void removeFromSelection(E item) { Lock lock = this.selectionList.getReadWriteLock().writeLock(); lock.lock(); try { this.selectionList.remove(item); } finally { lock.unlock(); } }