- java.lang.Object
-
- xyz.cofe.collection.BasicEventSet<E>
-
- Type Parameters:
E- тип элементов в наборе
- All Implemented Interfaces:
Iterable<E>,Collection<E>,Set<E>,CollectionEventPublisher<EventSet<E>,E>,EventSet<E>,GetReadLock,GetWriteLock,ReadWriteLockSupport,Eterable<E>,LongScn<EventSet<E>,CollectionEvent<EventSet<E>,E>>,Scn<EventSet<E>,Long,CollectionEvent<EventSet<E>,E>>
- Direct Known Subclasses:
ClassSet
public class BasicEventSet<E> extends Object implements EventSet<E>
Набор объектов с поддержкой уведомлений
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface xyz.cofe.collection.EventSet
EventSet.DummyIterator, EventSet.EIterator<E>
-
-
Field Summary
Fields Modifier and Type Field Description protected ReadWriteLockreadWriteLockБлокировка чтения/записиprotected Set<E>targetСсылка на оригинальный набор
-
Constructor Summary
Constructors Constructor Description BasicEventSet()Конструктор по умолчаниюBasicEventSet(Set<E> set)КонструкторBasicEventSet(Set<E> set, ReadWriteLock rwLock)Конструктор
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LockgetReadLock()Возвращает блокировку чтенияLockgetWriteLock()Возвращает блокировку записиListenersHelper<CollectionListener<EventSet<E>,E>,CollectionEvent<EventSet<E>,E>>listenerHelper()Возвращает подписчиковListenersHelper<ScnListener<EventSet<E>,Long,CollectionEvent<EventSet<E>,E>>,ScnEvent<EventSet<E>,Long,CollectionEvent<EventSet<E>,E>>>scnListenerHelper()Возвращает помощника издателя для поддержи событийSet<E>target()Возвращает целевое множество (Set), над которым происходят преобразования-
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.EventSet
add, addAll, clear, contains, containsAll, fireCollectionEvent, fireDeleted, fireInserted, isEmpty, iterator, onAdded, onRemoved, remove, removeAll, removeIf, retainAll, size, toArray, toArray
-
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
-
Methods inherited from interface java.util.Set
equals, hashCode, spliterator
-
-
-
-
Field Detail
-
readWriteLock
protected volatile ReadWriteLock readWriteLock
Блокировка чтения/записи
-
-
Constructor Detail
-
BasicEventSet
public BasicEventSet()
Конструктор по умолчанию
-
BasicEventSet
public BasicEventSet(Set<E> set)
Конструктор- Parameters:
set- Ссылка на оригинальный набор
-
BasicEventSet
public BasicEventSet(Set<E> set, ReadWriteLock rwLock)
Конструктор- Parameters:
set- Ссылка на оригинальный наборrwLock- Блокировка чтения/записи
-
-
Method Detail
-
scnListenerHelper
public ListenersHelper<ScnListener<EventSet<E>,Long,CollectionEvent<EventSet<E>,E>>,ScnEvent<EventSet<E>,Long,CollectionEvent<EventSet<E>,E>>> scnListenerHelper()
Возвращает помощника издателя для поддержи событий- Specified by:
scnListenerHelperin interfaceScn<EventSet<E>,Long,CollectionEvent<EventSet<E>,E>>- Returns:
- помощник издателя
-
target
public Set<E> target()
Description copied from interface:EventSetВозвращает целевое множество (Set), над которым происходят преобразования
-
listenerHelper
public ListenersHelper<CollectionListener<EventSet<E>,E>,CollectionEvent<EventSet<E>,E>> listenerHelper()
Возвращает подписчиков- Specified by:
listenerHelperin interfaceCollectionEventPublisher<EventSet<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:
- блокировка записи
-
-