- java.lang.Object
-
- xyz.cofe.collection.BasicEventList<E>
-
- Type Parameters:
E- тип элементов в списке
- All Implemented Interfaces:
Iterable<E>,Collection<E>,List<E>,CollectionEventPublisher<EventList<E>,E>,EventList<E>,GetReadLock,GetWriteLock,ReadWriteLockSupport,Eterable<E>,LongScn<EventList<E>,CollectionEvent<EventList<E>,E>>,Scn<EventList<E>,Long,CollectionEvent<EventList<E>,E>>
- Direct Known Subclasses:
StdEventList
public class BasicEventList<E> extends Object implements EventList<E>
Список с поддержкой уведомлений
-
-
Field Summary
Fields Modifier and Type Field Description protected ReadWriteLockreadWriteLockБлокировка чтения/записиprotected List<E>targetСсылка на оригинальный список
-
Constructor Summary
Constructors Constructor Description BasicEventList()Конструктор по умолчаниюBasicEventList(List<E> target)КонструкторBasicEventList(List<E> target, ReadWriteLock rwLock)Конструктор
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LockgetReadLock()Возвращает блокировку чтенияLockgetWriteLock()Возвращает блокировку записиListenersHelper<CollectionListener<EventList<E>,E>,CollectionEvent<EventList<E>,E>>listenerHelper()Возвращает подписчиковListenersHelper<ScnListener<EventList<E>,Long,CollectionEvent<EventList<E>,E>>,ScnEvent<EventList<E>,Long,CollectionEvent<EventList<E>,E>>>scnListenerHelper()Возвращает помощника издателя для поддержи событийList<E>target()Возвращает целевой список, над которым происходят преобразования-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Methods inherited from interface xyz.cofe.collection.CollectionEventPublisher
addCollectionEvent, addCollectionListener, addCollectionListener, getCollectionEventQueue, getCollectionListeners, hasCollectionListener, removeCollectionListener, withCollectionEventQueue, withCollectionEventQueue
-
Methods inherited from interface xyz.cofe.iter.Eterable
count, filter, first, limit, map, notNull, product, product, product, product, product, reduce, toList, union, union
-
Methods inherited from interface xyz.cofe.collection.EventList
add, add, addAll, addAll, clear, contains, containsAll, fireCollectionEvent, fireDeleted, fireInserted, fireUpdated, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, onChanged, onChanged, onDeleted, onDeleted, onInserted, onInserted, onUpdated, onUpdated, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, subList, toArray, toArray
-
Methods inherited from interface java.util.List
equals, hashCode, spliterator
-
Methods inherited from interface xyz.cofe.ecolls.ReadWriteLockSupport
readLock, readLock, writeLock, writeLock
-
Methods inherited from interface xyz.cofe.scn.Scn
addScnChangedListener, addScnChangedListener, fireScnChanged, fireScnChanged, getScnChangedListeners, hasScnChangedListener, onScn, removeAllScnChangedListeners, removeScnChangedListener, scn, scn
-
-
-
-
Field Detail
-
readWriteLock
protected volatile ReadWriteLock readWriteLock
Блокировка чтения/записи
-
-
Constructor Detail
-
BasicEventList
public BasicEventList()
Конструктор по умолчанию
-
BasicEventList
public BasicEventList(List<E> target)
Конструктор- Parameters:
target- целевой список над которым производятся манипуляции
-
BasicEventList
public BasicEventList(List<E> target, ReadWriteLock rwLock)
Конструктор- Parameters:
target- Целевой список над которым производятся манипуляцииrwLock- Ссылка на оригинальный список
-
-
Method Detail
-
scnListenerHelper
public ListenersHelper<ScnListener<EventList<E>,Long,CollectionEvent<EventList<E>,E>>,ScnEvent<EventList<E>,Long,CollectionEvent<EventList<E>,E>>> scnListenerHelper()
Возвращает помощника издателя для поддержи событий- Specified by:
scnListenerHelperin interfaceScn<EventList<E>,Long,CollectionEvent<EventList<E>,E>>- Returns:
- помощник издателя
-
listenerHelper
public ListenersHelper<CollectionListener<EventList<E>,E>,CollectionEvent<EventList<E>,E>> listenerHelper()
Возвращает подписчиков- Specified by:
listenerHelperin interfaceCollectionEventPublisher<EventList<E>,E>- Returns:
- подписчики
-
getReadLock
public Lock getReadLock()
Description copied from interface:ReadWriteLockSupportВозвращает блокировку чтения- Specified by:
getReadLockin interfaceGetReadLock- Specified by:
getReadLockin interfaceReadWriteLockSupport- Returns:
- блокировка чтения
-
getWriteLock
public Lock getWriteLock()
Description copied from interface:ReadWriteLockSupportВозвращает блокировку записи- Specified by:
getWriteLockin interfaceGetWriteLock- Specified by:
getWriteLockin interfaceReadWriteLockSupport- Returns:
- блокировка записи
-
-