public class InterceptableSparseEventList<E> extends InterceptableEventList<E> implements SparseEventList<E>
BasicSparseEventList
that allows write operations to it to be intercepted.SparseList.Span
interceptor
publisher, readWriteLock, updates
Constructor and Description |
---|
InterceptableSparseEventList(SparseEventList<E> delegate,
EventListInterceptor<E> interceptor) |
Modifier and Type | Method and Description |
---|---|
void |
addNulls(int index,
int length)
Add/insert a sequence of
null at the given index (in)to the list. |
void |
clear()
Removes all of the elements from this list (optional operation).
|
E |
clear(int index)
Clear the element at the given index.
|
E |
get(int index)
Returns the element at the specified position in this list.
|
E |
getNullElement(int index) |
int |
indexOf(Object object)
Returns the index in this list of the first occurrence of the specified element, or -1 if this
list does not contain this element.
|
Iterator<SparseList.Span> |
spanIterator()
Return an iterator over the populated
SparseList.Span s of this sparse list. |
Iterator<SparseList.Span> |
spanIterator(int min,
int max)
Return an iterator over the populated
SparseList.Span s of this sparse list. |
add, addAll, addListEventListener, dispose, iterator, listIterator, remove, removeAll, removeListEventListener, retainAll, set, size
add, addAll, contains, containsAll, equals, getPublisher, getReadWriteLock, hashCode, isEmpty, lastIndexOf, listIterator, remove, subList, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addListEventListener, dispose, getPublisher, getReadWriteLock, removeListEventListener
add, add, addAll, addAll, contains, containsAll, equals, hashCode, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
parallelStream, removeIf, stream
public InterceptableSparseEventList(SparseEventList<E> delegate, EventListInterceptor<E> interceptor)
public void clear()
AbstractEventList
clear
in interface Collection<E>
clear
in interface List<E>
clear
in class InterceptableEventList<E>
public Iterator<SparseList.Span> spanIterator()
SparseList
SparseList.Span
s of this sparse list. A span is a
consecutive range of non-null
entries in the list.spanIterator
in interface SparseList<E>
public Iterator<SparseList.Span> spanIterator(int min, int max)
SparseList
SparseList.Span
s of this sparse list. A span is a
consecutive range of non-null
entries in the list. Only entries within the range
[min..max]
are considered.spanIterator
in interface SparseList<E>
min
- the minimum index to considermax
- the maximum index to considerpublic void addNulls(int index, int length)
SparseList
null
at the given index (in)to the list.addNulls
in interface SparseList<E>
public int indexOf(Object object)
AbstractEventList
i
such
that (o==null ? get(i)==null : o.equals(get(i)))
, or -1 if there is no such index.public E get(int index)
AbstractEventList
public E getNullElement(int index)
getNullElement
in interface SparseEventList<E>
null
-element).public E clear(int index)
SparseList
List.remove(int)
, the indices of all
other elements are unaffected by this operation.clear
in interface SparseList<E>
Copyright © 2024 levigo holding gmbh. All rights reserved.