/** {@inheritDoc} */ @Override public Object replaceElements(Object original, Object target, CollectionPersister persister, Object owner, Map copyCache, SessionImplementor session) throws HibernateException { final EventList result = (EventList) target; final EventList source = (EventList) original; result.clear(); result.addAll(source); return result; }
/** {@inheritDoc} */ public Object replaceElements(Object original, Object target, CollectionPersister persister, Object owner, Map copyCache, SessionImplementor session) throws HibernateException { final EventList result = (EventList) target; final EventList source = (EventList) original; result.clear(); result.addAll(source); return result; }
/** * Creates a new {@link EventList} which contains the contents of the specified * {@link Collection}. The {@link EventList}'s order will be determined by * {@link Collection#iterator() contents.iterator()}. * * @param contents the collection with list elements, if <code>null</code> the result will be * an empty list */ public static <E> EventList<E> eventList(Collection<? extends E> contents) { final EventList<E> result = new BasicEventList<E>(contents == null ? 0 : contents.size()); if(contents != null) result.addAll(contents); return result; }
/** * {@inheritDoc} */ @Override public boolean addAll(Collection<? extends E> c) { return supplyInsideLock(() -> delegate.addAll(c)); }
/** * Creates a new {@link EventList} which contains the contents of the specified * {@link Collection}. The {@link EventList}'s order will be determined by * {@link Collection#iterator() contents.iterator()}. * * @param contents the collection with list elements, if <code>null</code> the result will be * an empty list */ public static <E> EventList<E> eventList(Collection<? extends E> contents) { final EventList<E> result = new BasicEventList<E>(contents == null ? 0 : contents.size()); if(contents != null) result.addAll(contents); return result; }
/** {@inheritDoc} */ public Object replaceElements(Object original, Object target, CollectionPersister persister, Object owner, Map copyCache, SessionImplementor session) throws HibernateException { final EventList result = (EventList) target; final EventList source = (EventList) original; result.clear(); result.addAll(source); return result; }
/** {@inheritDoc} */ @Override public boolean addAll(Collection<? extends E> values) { beforeWriteOperation(); try { return delegate.addAll(values); } finally { afterWriteOperation(); } }
/** {@inheritDoc} */ @Override public boolean addAll(int index, Collection<? extends E> values) { beforeWriteOperation(); try { return delegate.addAll(index, values); } finally { afterWriteOperation(); } }
public AutocompleteComboBox(Collection<E> items) { super(); this.items = new BasicEventList<>(); this.items.addAll(items); init(); }
/** * {@inheritDoc} */ @Override public boolean addAll(E... es) { source.getReadWriteLock().writeLock().lock(); try { return source.addAll(Arrays.asList(es)); } finally { source.getReadWriteLock().writeLock().unlock(); } }
@Override public void run() { try { eventList.getReadWriteLock().writeLock().lock(); List<T> cache = new ArrayList<>(eventList); eventList.clear(); eventList.addAll(cache); } finally { eventList.getReadWriteLock().writeLock().unlock(); } } });
/** {@inheritDoc} */ @Override public boolean addAll(int index, Collection<? extends E> values) { getReadWriteLock().writeLock().lock(); try { return source.addAll(index, values); } finally { getReadWriteLock().writeLock().unlock(); } }
/** {@inheritDoc} */ @Override public boolean addAll(Collection<? extends E> values) { getReadWriteLock().writeLock().lock(); try { return source.addAll(values); } finally { getReadWriteLock().writeLock().unlock(); } }
/** {@inheritDoc} */ @Override public boolean addAll(int index, Collection<? extends E> values) { getReadWriteLock().writeLock().lock(); try { return source.addAll(index, values); } finally { getReadWriteLock().writeLock().unlock(); } }
@Override public void run() { try { marketOrdersEventList.getReadWriteLock().writeLock().lock(); marketOrdersEventList.clear(); marketOrdersEventList.addAll(marketOrders); } finally { marketOrdersEventList.getReadWriteLock().writeLock().unlock(); } } });
@Override public void run() { try { contractEventList.getReadWriteLock().writeLock().lock(); contractEventList.clear(); contractEventList.addAll(contracts); } finally { contractEventList.getReadWriteLock().writeLock().unlock(); } } });
@Override public void run() { try { contractItemEventList.getReadWriteLock().writeLock().lock(); contractItemEventList.clear(); contractItemEventList.addAll(contractItems); } finally { contractItemEventList.getReadWriteLock().writeLock().unlock(); } } });
@Override public void run() { try { transactionsEventList.getReadWriteLock().writeLock().lock(); transactionsEventList.clear(); transactionsEventList.addAll(transactions); } finally { transactionsEventList.getReadWriteLock().writeLock().unlock(); } } });
@Override public void run() { try { accountBalanceEventList.getReadWriteLock().writeLock().lock(); accountBalanceEventList.clear(); accountBalanceEventList.addAll(accountBalance); } finally { accountBalanceEventList.getReadWriteLock().writeLock().unlock(); } } });
@Override public void run() { try { eventList.getReadWriteLock().writeLock().lock(); eventList.removeAll(found); eventList.addAll(found); } finally { eventList.getReadWriteLock().writeLock().unlock(); } } });